zoukankan      html  css  js  c++  java
  • IOS---通知

     

    http://www.cnblogs.com/kenshincui/p/4168532.html

    本地通知

      UILocalNotification *local=[[UILocalNotification alloc]init];

        local.fireDate=[NSDate dateWithTimeIntervalSinceNow:10.0f];

        local.alertBody=@"该吃药了!!";

        [[UIApplication sharedApplication] scheduleLocalNotification:local];

     

    iOS8.0之后a中需要用户同意

    Application中写

        float sysVersion=[[UIDevice currentDevice]systemVersion].floatValue;

        if (sysVersion>=8.0) {

            UIUserNotificationType type=UIUserNotificationTypeBadge | UIUserNotificationTypeAlert | UIUserNotificationTypeSound;

            UIUserNotificationSettings *setting=[UIUserNotificationSettings settingsForTypes:type categories:nil];

            [[UIApplication sharedApplication]registerUserNotificationSettings:setting];

        }

  • 相关阅读:
    四则运算
    自我介绍
    代练第七天
    代练第六天
    代练第五天
    代练第四天
    补充总结
    对软件工程课程的总结
    作业4:结对编程项目四则运算
    psp记录个人项目花费时间
  • 原文地址:https://www.cnblogs.com/lvchenhao/p/4468817.html
Copyright © 2011-2022 走看看