我有一个带有选项卡控制器的应用程序,它显然有一定数量的选项卡。TabController 中的每个 ViewController 都共享一些信息,所以我决定将这些信息移到 AppDelegate 中并合成 NSDictionary 中的所有内容,以便我可以访问那些使用
[[[UIApplication sharedApplication] delegate] sharedInformations];
该解决方案运行良好,我想它非常好(我接受更好的解决方案)。显然,编译器警告我 [[UIApplication sharedApplication] delegate] 可能不会响应方法 sharedInformations 因为他没有在协议中找到该方法,但我知道它会。
问题是:如何抑制该警告?