C++调用Object-C界面

在C++代码中想调用显示一个IOS界面,使用NSNotificationCenter

1、在界面中注册消息

[[NSNotificationCenter defaultCenter]  addObserver:self selector:@selector(mytestFunc:) name:@" mytest" object:nil];

//处理消息的函数

- (void) mytestFunc:(NSNotification*) notification

{

   id obj = [notification object];//获取到传递的对象

2、c++程序中发送消息

[[NSNotificationCenter defaultCenter] postNotificationName:@"mytest" object:searchFriendArray];

原文地址:https://www.cnblogs.com/coolbear/p/3778309.html