我想在我的AppDelegate.m中NSNotification
从这个方法发送一个(当UIButton
点击时):
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ if (buttonIndex == 0){ //cancel clicked ...do your action // HERE } }
..并在我的一个接收它UIViewControllers
.我怎样才能做到这一点?
编辑更多信息:我正在制作一个警报应用程序,当用户按下时UIButton
,我想停止警报.我想这NSNotifications
是从AppDelegate.m文件获取信息到ViewController.m文件的唯一方法?