Discussion Forums  >  Status Bar, Navigation Bar

Replies: 2    Views: 227

Antonios
Apple Fan
Profile
Posts: 381
Reg: Feb 12, 2013
Korinthos, Gree...
4,610
04/17/13 12:03 PM (11 years ago)

Back button - previous screen title text

Can anyone tell me how can I change the standard back button with a new custom one which will be as following: 1) Like a left arrow : like this one: http://cssnerd.com/wp-content/uploads/2011/11/Bildschirmfoto-2011-12-05-um-11.29.44.png 2) How can I replace the "back" text, so that it automatically shows the previous screen's nav title? I have only managed to change the "back" text with one of my own!
 
Antonios
Apple Fan
Profile
Posts: 381
Reg: Feb 12, 2013
Korinthos, Gree...
4,610
like
04/19/13 07:13 PM (11 years ago)
anyone?
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
05/10/13 06:39 AM (10 years ago)
Hi. Try this. I'm using it. Add the below method to your appdelegate.m file just near the end before (void)dealloc method. //////////////////////////////////////// -(void)customizeUI{ //set navbar button bg UIImage *navBarBtnBg = [[UIImage imageNamed:@"menubar-button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 4)]; [[UIBarButtonItem appearance] setBackgroundImage:navBarBtnBg forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; //set back button bg UIImage *backBtn = [[UIImage imageNamed:@"back.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 14, 0, 4)]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backBtn forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; } ///////////////////////////////////////// Then call the method in your didfinishloadingwithoptions at the beginning of the app delegate like this: [self customizeUI]; Of course you'll have to define and declare in the .h file and stuff, but you get the hang of it. Also don't forget to put in the images!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.