美文网首页
iOS LocalPush

iOS LocalPush

作者: 一昂杨杨 | 来源:发表于2017-07-06 10:27 被阅读0次

    UILocalNotification *notif = [UILocalNotification new]; 

    notif.fireDate = [NSDate dateWithTimeIntervalSinceNow:3];

    notif.alertBody = @"该睡觉了!!!";

    notif.alertTitle = @"提示";

    notif.userInfo = @{@"key":@"value"};

    notif.soundName = @"default";

    [[UIApplication sharedApplication] scheduleLocalNotification:notif];

    相关文章

      网友评论

          本文标题:iOS LocalPush

          本文链接:https://www.haomeiwen.com/subject/safhhxtx.html