Cat Share, must boutique
Material code Address: http://download.csdn.net/detail/u013357243/8602889
Original articles, welcome reprint. Reprint Please specify: Sanayu's Blog
Address: http://blog.csdn.net/u013357243?viewmode=contents
Effect
Source
////NJVIEWCONTROLLER.M//06-uiapplication////Created by Apple on 14-6-3.//Copyright (c) 2014 Heima. All rights reserved.//#import "NJViewController.h" @interface njviewcontroller ()@end @implementation njviewcontroller - (void) viewdidload{[SuperViewdidload];additional setup after loading the view, typically from a nib.//UIApplication *app = [uiapplication sharedapplication];//UIApplication *APP1 = [uiapplication sharedapplication];////uiapplication *app2 = [[UIApplication alloc] init];//NSLog (@ "%p-%p", app, App1); UIButton*BTN = [[UIButtonAlloc] Initwithframe:cgrectmake ( -, -, -, -)]; [Btn settitle:@"point me."Forstate:uicontrolstatenormal]; [BTN AddTarget: SelfAction@selector(OnClick) forcontrolevents:uicontroleventtouchupinside]; Btn. BackgroundColor= [UicolorRedcolor]; [ Self. ViewADDSUBVIEW:BTN];} - (void) onclick{//NSLog (@ "was ordered"); uiapplication*app = [uiapplicationSharedapplication];//Set the number on the application icon//App.applicationiconbadgenumber = 998; //Set up Networking animations for the status bar//app.networkactivityindicatorvisible = YES; //Set the style of the status bar //App.statusbarstyle = uistatusbarstylelightcontent;//[app Setstatusbarstyle:uistatusbarstylelightcontent Animated:yes]; //Set whether the status bar is hidden//App.statusbarhidden = YES;//[app Setstatusbarhidden:yes Withanimation:uistatusbaranimationfade]; /* URL: Uniform Resource Locator, which is used to uniquely represent a resource URL: protocol header://Host address/resource Path network resource: Http://www.baidu.com/images/20140603/abc.png Local Resources: File:///users/apple/desktop/abc.png */ Nsurl*url = [Nsurlurlwithstring:@"Http://www.baidu.com"]; [App Openurl:url];}//-(uistatusbarstyle) Preferredstatusbarstyle//{//return uistatusbarstylelightcontent;//}//-(BOOL) Prefersstatusbarhidden//{//return YES;//}@end
PS: New iOS Exchange Learning Group: 304570962 can add cat qq:1764541256 or Znycat Let's study hard together.
Sanayu's Blog
Address: http://blog.csdn.net/u013357243?viewmode=contents
(source code) Cat Learn iOS (21) UIApplication Set program icon on top right? Red Digital _ finger-pointing device, etc.