Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 76

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
03/02/14 09:47 AM (10 years ago)

Add left navbar button on home screen

My home screen is a menu with image plugin. I disconnect my apps from the BT server so I don't usually see the refresh icon (which is how I like it). I would like to add either a search or info icon in its place and load that particular screen. Has anyone done this? I imagine it there would be code in the menu with image plugin that says something like: if title=home, then leftnavbarbutton=search, load itemID#########. I'm obviously not good at coding. Anyone have any luck with this? Josh
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/02/14 11:00 AM (10 years ago)
I have never done it, Josh. See if my last tip on this post gets you to the right area for swapping of the Refresh button. Not sure if it will help. Depends on how far you want to be led to water :-) Let us know.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/02/14 11:06 AM (10 years ago)
Where's your last tip? I can't find it in the forums
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/02/14 11:07 AM (10 years ago)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/02/14 12:05 PM (10 years ago)
This should be really easy. In the viewWillAppear method (after the [super viewWillAppear:animated]; statement, write something like this: UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"Press Me!" style:UIBarButtonItemStylePlain target:self action:@selector(someMethodName)]; [self.navigationItem setLeftBarButtonItem:leftButton]; -------------------------------- https://www.buzz-tools.com
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/02/14 12:23 PM (10 years ago)
Chris rocks the house again!
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/02/14 01:14 PM (10 years ago)
Thanks for the help guys! I only want this to appear on my main home screen though, and use the menu with image plugin several times. So will have some more coding to do. It's not necessary for this update but will give me something to play around with. Thanks!!!
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/02/14 01:40 PM (10 years ago)
Try surrounding that code with this if statement: if([self.screenData isHomeScreen]){ }
 

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.