私のコードは:
- (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をクリックすると、ビューコントローラにアクセスできます。方法は?ありがとうございます。