从Objective C类调用Objective C ++方法 [英] Calling Objective C++ methods from Objective C Classes
问题描述
是否可以从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屋!