custom navigation bar title in iOS:
UILabel *titletext = [[UILabel alloc] Initwithframe:cgrectmake (0 = [Uicolor clearcolor]; Titletext.textcolor=[Uicolor Whitecolor]; [TitleText setfont:[uifont systemfontofsize:17.0]]; [TitleText SetText: @" XXX " ]; Self.navigationItem.titleView=titletext; [TitleText release];
Customize navigation bar Back button in iOS: (Before Pushviewcontroller)
Uibarbuttonitem *backitem=[[Uibarbuttonitem alloc]init]; Backitem.title=@ " back "; Backitem.tintcolor=[uicolor colorwithred:129/255.0 Green:129/255.0 Blue:129/255.0 Alpha:1.0]; = Backitem; [Backitem release];
Custom navigation bar Right button in iOS:
Uibarbuttonitem * Rightbutton =[[Uibarbuttonitem alloc] Initwithtitle:@"Back to Home"style:uibarbuttonitemstylebordered Target:self Action: @selector (Callmodallist)]; Rightbutton.image=[uiimage imagenamed:@"Right_button.png"];rightbutton.tintcolor=[uicolor colorwithred: About/255.0Green About/255.0Blue About/255.0Alpha1.0];self.navigationitem.rightbarbuttonitem=Rightbutton; [Rightbutton release];
Or
//Set Back buttonUIButton* Backbutton =[UIButton Buttonwithtype:uibuttontypecustom]; [Backbutton setbackgroundimage:[uiimage imagenamed:@"Btn_public_back"] Forstate:uicontrolstatenormal]; Backbutton.frame= CGRectMake (0,0, *, *); [Backbutton addtarget:self Action: @selector (Backaction) forcontrolevents:uicontroleventtouchupinside]; Leftbaritem=[[Uibarbuttonitem alloc] Initwithcustomview:backbutton]; Self.navigationItem.leftBarButtonItem= Leftbaritem;
IOS custom navigation bar title and return button title