单例通过 : share开头 [UIApplication sharedApplication]
@property(nonatomic) NSInteger applicationIconBadgeNumber
@property(nonatomic,getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible
App的提示框(在iOS8-之前没有这个直接设置数字提醒就可以)
Paste_Image.png
Paste_Image.png
Paste_Image.png
Paste_Image.png
Paste_Image.png
每次控制状态栏都要在控制器里写代码,很恶心
Paste_Image.png
我们可以这样
Paste_Image.png
添加一个(最后一个,View controller - based status)
Paste_Image.png
Paste_Image.png
所有的移动操作系统都有个致命的缺点,容易受打扰。(来电,锁屏幕)等,这个时候后会导致App进入后台和终止,还有很多,这个时候会通知它的delegate对象,让delegate代理来处理这些系统时间
// app接收到内存警告时调用
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application;
// App进入后台时候调用
- (void)applicationDidEnterBackground:(UIApplication *)application
// App启动的时候调用
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
UIApplication的代理实现:
Paste_Image.png
Paste_Image.png
Paste_Image.png