本地通知

- (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];
}

你可能感兴趣的:(本地通知)