我的代码是:
- (void) socketIO:(SocketIO *)socket didReceiveEvent:(SocketIOPacket *)packet
{
NSLog(@"didReceiveEvent(),%@",packet.data );
SysNotification *sysNotification=[GlobalVariable parseSysNotificationWithString:packet.data];
UILocalNotification *alarm = [[UILocalNotification alloc] init];
if (alarm) {
alarm.fireDate = [NSDate date];
alarm.timeZone = [NSTimeZone defaultTimeZone];
alarm.repeatInterval = 0;
alarm.soundName = UILocalNotificationDefaultSoundName;
alarm.alertBody = @"Test message...";
NSDictionary *infoDic = [NSDictionary dictionaryWithObject:@"name" forKey:@"key"];
alarm.userInfo = infoDic;
[[UIApplication sharedApplication] presentLocalNotificationNow:alarm];
}
}
我想当我点击状态栏上的 UILocalNotification 时,我可以来一些视图控制器。怎么办?谢谢