【发布时间】:2013-07-09 23:30:12
【问题描述】:
我有一个存储在 ViewController.m 中的数组。但是当应用程序进入后台时,我想从数组中发布通知。
所以我的 NSMutableArray “列表”是在 ViewController.m 中创建的,但我需要在 AppDelegate.m 中使用
- (void)applicationDidEnterBackground:(UIApplication *)application
for (NSString *thing in list) {
UILocalNotification *notif = [[UILocalNotification alloc] init];
notif.alertBody = thing.text;
[[UIApplication sharedApplication] presentLocalNotificationNow:notif];
【问题讨论】:
标签: ios arrays object viewcontroller appdelegate