我想使用事件在不同的模块之间进行通信。 IOS中是否有事件机制?我正在寻找类似于Android中的BroadcastReceiver的东西。
感谢。 PB。
答案 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/