Discussion Forums  >  Uncategorized

Replies: 8    Views: 362

Tricia109
Aspiring developer
Profile
Posts: 26
Reg: Jun 29, 2011
Brisbane
260
08/16/11 10:54 PM (14 years ago)

Modifying right button image

Hi , would anyone be able to please tell me where I can locate the right button images from the Xcode project. I have looked in the BT_Images folder but I can't find any images with names the same as those appearing in the right hand button selection menu. For example, the Info Dark button. cheers Tricia
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/17/11 12:44 AM (14 years ago)
Hi Tricia: The image names you see in the control panel determine what iOS image style to use. There are no images, iOS uses these images automagically. You could modify some logic to use an image instead but it's a bit tricky. Have a look at the BT_Layout folder > BT_viewUtilities.m file. Look for the configureBackgroundAndNavBar method you'll see where the right-side-image is added to the navigation bar.
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
08/30/11 08:00 AM (14 years ago)
Can i modify the name of the button. Example, instead of saying next it can say cart or buy? Please advise
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/31/11 12:52 AM (14 years ago)
Hi Rad...if you look at the BT_viewUtilities.m file you'll see where the button is setup. It changes a bit depending on the type of 'right button' you choose in the control panel. Some use an image, some use text. You could also see how the back button is setup, it always uses text. You'll end up creating a UIBarButtonItem like the existing code does and setting it's text to whatever you want.
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
08/31/11 03:57 AM (14 years ago)
David, I've set up the command line and UIBarButtonItem in Xcode. My only question now is do i select a similar item from the dropdown list like next and then go in manually and modify it to say my command? If so, where would i make that modification? Im only privy to making changes config file in the core setting area of the control panel, but then i would need to save it and serve it on my own network. please advise.
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
09/01/11 08:10 AM (14 years ago)
The easiest way is to select either 'Home' or 'Next' in the Right Button Type. Then in xCode, open BT_viewUtilities.m and find the corresponding button. Here's the 'Home' button: if([rightButtonType isEqualToString:@home]) theBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@home, @Home) style:UIBarButtonItemStylePlain target:theViewController action:@selector(navRightTap) ]; Change the (@home, @Home) to whatever text you want, like: (@Inbox, @Inbox). Compile and run. Here's a screen shot of the final: http://www.jc-evans.com/images/inbox-shot.png
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
09/01/11 08:59 AM (14 years ago)
GoBlue, Thank you so very much for your assistance. If there are any medical questions I can ever answer for you, please do not hesitate to ask. I'm am building an app for my medical students and you just made buying books a whole lot easier for them. Thanks again, Anthony
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
09/03/11 07:53 PM (14 years ago)
My pleasure. Good luck!
 
byteblorg
Aspiring developer
Profile
Posts: 17
Reg: Aug 15, 2011
singapore
170
like
10/28/11 07:06 PM (14 years ago)
good points thanks!
 

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.