从Objective C类调用Objective C ++方法 [英] Calling Objective C++ methods from Objective C Classes

查看:98
本文介绍了从Objective C类调用Objective C ++方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Objective C类调用Objective- C ++类和方法?

Is it possible to Call the Objective- C++ classes and methods from the Objective C Class?

我们已经用Objective C代码编写了一个项目.现在我们要集成一个C ++类,因此我想只将一个类更改为与本地C ++类进行交互的Objective C ++,其他类将保留在Objective C中. 是否有可能?谁能帮助我寻求更好的解决方案?

Already we have written a project with Objective C code. Now we have one C++ class to be integrated, So i thought to change only one Class to Objective C++ which interacts with native C++ Classes others will remain in Objective C. Is it possible? Could anyone can help me for better solution?

谢谢.

推荐答案

是的,您可以这样做.只要类的接口是C-ish,Objective-C都不关心实现是Objective-C还是Objective-C ++.

Yes, you can do that. As long as the interface of the class is C-ish, Objective-C doesn't care if the implementation is Objective-C or Objective-C++.

这篇关于从Objective C类调用Objective C ++方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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