IOS事件机制

时间:2013-01-28 12:37:35

标签: iphone ios events

我想使用事件在不同的模块之间进行通信。 IOS中是否有事件机制?我正在寻找类似于Android中的BroadcastReceiver的东西。

感谢。 PB。

1 个答案:

答案 0 :(得分:2)

在同一进程中的不同模块之间:

这里NSNotification很酷:
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_nsnotificationcenter/


进程之间的

IOS没有提供任何真正专用的方法来做到这一点。但是你可以(很多人)使用自定义网址方案:
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-working-with-url-schemes/