IOS Arc Project uses non-arc files 1. No arc was used for his old project, but the third-party library was introduced using arc. for the first case, the source file with the arc is given, and the-FOBJC-ARC option is added
2. The new project uses arc, but the introduction of the third-party library or the code that was written did not use arc.
For another case, join-FNO-OBJC-ARC
Change Navigationcontroller's Back button title
A push to B. Change the return title of B
Just add the following code to a
<span style= "FONT-SIZE:18PX;" >uibarbuttonitem *backitem = [[Uibarbuttonitem alloc] Init];backitem.title = @ "Back"; Self.navigationItem.backBarButtonItem = backitem;</span>
-(instancetype) Initwithnavigationbarclass: (Class) Navigationbarclass Toolbarclass: (Class) Toolbarclass Ns_available_ios (5_0);
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary *) launchOptions{ Self.window = [[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; [[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstylelightcontent]; Uinavigationcontroller *navigationcontroller = [[Uinavigationcontroller alloc] initwithnavigationbarclass:[ Crgradientnavigationbar class] Toolbarclass:nil]; Uicolor *firstcolor = [Uicolor colorwithred:255.0f/255.0f green:42.0f/255.0f blue:104.0f/255.0f alpha:1.0f]; Uicolor *secondcolor = [Uicolor colorwithred:255.0f/255.0f green:90.0f/255.0f blue:58.0f/255.0f alpha:1.0f]; Nsarray *colors = [Nsarray arraywithobjects: (ID) firstcolor.cgcolor, (ID) secondcolor.cgcolor, nil]; Nsarray *colors = [Nsarray arraywithobjects: (ID) Uicolorfromrgb (0xf16149). Cgcolor, (ID) Uicolorfromrgb (0xf14959). Cgcolor, nil]; [[Crgradientnavigationbar appearance] setbartintgradientcolors:colors]; [[NaviGationcontroller Navigationbar] Settranslucent:no]; Remember, the default value is YES. Demoviewcontroller *viewcontroller = [[Demoviewcontroller alloc] init]; [Navigationcontroller Setviewcontrollers:@[viewcontroller]]; [Self.window Setrootviewcontroller:navigationcontroller]; Self.window.backgroundColor = [Uicolor Whitecolor]; [Self.window makekeyandvisible]; return YES;}
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Forgotten knowledge of iOS