Discussion Forums  >  Uncategorized

Replies: 3    Views: 462

baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
02/09/11 04:33 PM (15 years ago)

Custom Nav Bar Button

Another question from me today!!! Is there any way of creating a custom right nav bar button? I would like to add a 'home' button to my pages so users don't have to repeatedly press 'back' to return to the home screen. Once again thanks in advance!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/09/11 05:27 PM (15 years ago)
Sure, you can put any button you want on the RIGHT of any screen you want. Look at the advanced properties, you'll see a Right Nav button setup. You can choose the button, and the screen that loads when the button is pressed. The buttons in the list are standard tool-bar buttons from iOS. If you want to create a different button, like one that uses an icon (house.png?) you'll need to change the source-code to accomodate for this. If your'e not comfortable with the idea of changing the source-code to accomodate for right-buttons other than the provided right buttons, you'll have to wait until we get around to it. This is a good idea and does make sense. You would think that allowing an image for the right side button would be doable. Good thinking.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
02/09/11 07:00 PM (15 years ago)
Thanks David. Have found a work-around for this it's fairly crude but seems to work for my needs. For anyone else that may be interested here's what I did: 1) In the advanced properties menu of the screen select Right Nav Button = 'Next' and select which screen you want the button to open. 2) In the source code - file: BT_viewUtilities find the following phrase: NSLocalizedString(@next,@Next) 3) Edit this phrase to whatever text you would like the button to show. eg. for me it was: NSLocalizedString(@Home,@Home) I believe i'm correct in saying that the first argument (@...) is what will actually show in the button and the second argument is only used as an identifier for language translations. Anyway like I said this fulfills my needs and may help someone else.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/09/11 09:52 PM (15 years ago)
Good approach. However, if you want it to just read Home you could have changed this in the Language file. Expand the Localizable.strings node in the BT_Config folder. You'll see an English file. You can easily create additional files for additional language support. In this file, the next setting could be set to anything. In your case, Home The setting now reads: 'next' = 'Next'; You could change it to: 'next' = 'Home'; This would change it for anyone using English on their device. Creating additional language files would allow more customization for other languages. To use this, you of course would have to switch the source-code back to look for the 'Next' word in the file. NSLocalizedString(@next, @Next) means: ' Go to the language file and find the value of the setting named next. Hope this helps.
 

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.