本地通知

2016-02-18  本文已影响26人  喜欢就可以
- (void)sendLocalNotification:(NSString*)msg
{
    UILocalNotification *notice = [[UILocalNotification alloc] init];
    notice.alertBody = msg;
    notice.alertAction = Lang(@"Open", @"打开软件");
    notice.soundName = UILocalNotificationDefaultSoundName;
    notice.userInfo = @{@"msg":@"whatever you want"};
    [[UIApplication sharedApplication] presentLocalNotificationNow:notice];
}
上一篇 下一篇

猜你喜欢

热点阅读