objective c - iOS: Launch A Custom Message To Be Handled By AppDelegate -


i attempting call method in app delegate piece of code going shared between many other applications. instead of retrieving reference app delegate i'd launch message app delegate can respond if happens implement right function, similar how can implement methods applicationdidreceivememorywarning if want respond system memory warnings.

is possible or option have reference app delegate in code , check if responds selector before calling method?

posting notification via nsnotificationcenter best bet. i'd suggest checking out objc.io article: http://www.objc.io/issue-7/communication-patterns.html. it's great overview of different patterns decoupling code.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -