Discussion Forums  >  Uncategorized

Replies: 12    Views: 927

Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
05/17/11 11:06 PM (14 years ago)

Modify home tap layout button label in xcode

Hi, I have edited the source file quite heavily, but I found that I want to change the my bottom tap-button label on the home screen. I tried to find where the label is written, but I can't find it - I tried the config file on the root but no luck. Can anyone point me to where I can change the label text please? Thank you!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/17/11 11:55 PM (14 years ago)
What label on the home screen? Not sure what you're asking. can't be too tough ;-)
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/18/11 12:07 AM (14 years ago)
There are 2 types of home screen can choose from in v1.5 1 - scroll wheel 2 - bottom taps The label I'm asking is the bottom taps, the bottom button labels. I hope that is clear.. ? :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 12:11 AM (14 years ago)
Ah, yes. You're workign with a Menu-Button Screen. a) Click the name of the button-screen in your conrol panel to load it's properties b) In Advanced Settings, make sure you have Button Layout > Label Layout Style set to bottom (this will put the text underneath the button c) Next, for each button, add some text. Do this by setting the Button Title. Button titles are adjusted by clicking the button name (in the list of items you added to the button screen) and changing each buttons properties. This is the little window that opens when you click a button name.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/18/11 12:13 AM (14 years ago)
Sorry David Thanks for your help... but I'm asking where to edit it in Xcode because I've modified quite a lot of the source file downloaded. (I made the Caption into two text-fields and can be submitted to the PHP script!)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 12:20 AM (14 years ago)
Oh, yeah, you mentioned that! So... a little crazy but you can do it. Find: BT_Screens > BT_screen_menuButtons.m This is the file that does all the button layout work. A long method called layoutScreen is called each time the screen loads and it's the method that figures out how many buttons per row, the size of the buttons, the text location, etc. This method begins around line 297 (before you modified it) There are two concepts to think about. The first is the size / location of the 'box' the button text goes in and the second is the text itself. The frame is called labelRect in the code and it's super complicated how it's determined. This is because the control panel options. The text itself is set in a for-loop that starts about line 475. You'll see in this loop where each button's text is set to the value from the control panel. objectForKey:'titleText' You can change the text here but you'll need to figure out what button your're workign with inside this loop.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/18/11 12:24 AM (14 years ago)
Yea, I see the loop and kind of understand it. However, where is the text that I states the lable? I tried to change the BT_Config file where I see some itemType:BT_tab, textLabel:Tab Button. But the button still use the old text...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 12:29 AM (14 years ago)
ah... OK. The text does come from the BT_config file. Are you sure the app is reading the correct file, the one you're editing? It could be that the file in Xcode is NOT what the app is reading. It could be that it's reading a cached version of it? This depends on whether or not your app downloads a fresh copy from a server. So... make sure you're workign with the right file. Oh, also..in this file, look for the button screen. If it has a dataURL it is downloading button data from the server and ignoring the buttons listed in the BT_config. To change this, remove the dataURL so it doesn't check the server for button options. Make sense? Tip: Use the control panel to get the unique id of the button screen, it's in the address bar / URL after: BT_itemId Then, search for this value in the BT_config file to make sure you are working with the right screen in the configuration data. It gets very confusing very fast!
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/18/11 12:38 AM (14 years ago)
OHHhhh! Found it! I didn't know even the text-label is getting from buzztouch! Once I changed the label on buzztouch it works! I bet if no network available, it will use the label saved on the app? Thanks so much David. It's quite hard to believe you are doing so much and also reply my silly questions so promptly! Do you get pay to do all these?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 12:44 AM (14 years ago)
Questions = good not silly! Paid: Funny. I started this company and really REALLY enjoy participating in the forums. It's a treat for me. Sometimes I can't keep up but I do get to spend an hour or so listening, helping, tinkering each night before I turn in. It's after midnight here. During the day I work 100% on improving the product while some help in the office manages other aspects of the site. We have a very small team and work well together. No services on our site cost money (we offer nothing for sale) so my 'pay' is hard to associate with buzztouch. However, I've been doing businesses like this for over 10 years and all has worked out well ;-)
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/18/11 12:47 AM (14 years ago)
Sorry, but I'm interested to know how it can work out. May I share your story? Perhaps through email?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 12:54 AM (14 years ago)
Don't be sorry. If you think it's interesting.... laughing. Just sent you an email.
 
vlad12
Aspiring developer
Profile
Posts: 91
Reg: Jun 28, 2011
location unknow...
2,960
like
02/02/12 04:58 AM (14 years ago)
I need an tab layout menu because i'm using appoxee for notification and as far as i know it is working only with layout menu So the question is can i make it very small so it will not be observed or to hide it behind the background picture and deactivate it ? I know it sound a littel stupid my approch but i'm not realy good in coding and last time i when i tryed to do this i spend 2 days trying to make appoxee work with out tab layout and i couden't figure it out
 

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.