标签:
UIApplication的作用:
1.在应用程序图标上面添加数字
1)获取UIApplication单例
UIApplication *app = [UIApplication sharedApplication];
2)注册通知
UIUserNotificationSettings *setting = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];
[app registerUserNotificationSettings:setting];
3)设置应用程序图标提醒数字
app.applicationIconBadgeNumber = 10;
2.设置连网状态
//获取应用程序UIApplication单例
UIApplication *app =[UIApplication sharedApplication];
//网络工作活动表示可见
app.networkActivityIndicatorVisible = YES;
3.打开URL
UIApplication *app = [UIApplication sharedApplication];
NSURL *url = [NSURL URLWithString:@"http://192.168.21.33:81"];
[app openURL:url];
4.设置状态栏
标签:
原文地址:http://www.cnblogs.com/sanvow/p/5428274.html