将Objective-C类实例存储在C ++类中 [英] Storing Objective-C class instance in C++ class

查看:233
本文介绍了将Objective-C类实例存储在C ++类中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以将C ++类中的Objective-C类实例存储为成员?

Is there a way to store an Objective-C class instance inside of a C++ class as a member?

推荐答案

需要制作一个.mm文件,然后可以使用这里。另请参见有关混合语言的Apple的旧文档的参考

You need to make a .mm file, and then you can use the features outlined here. See also a reference to Apple's old documentation on the hybrid language.

这篇关于将Objective-C类实例存储在C ++类中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆