Discussion Forums  >  Uncategorized

Replies: 5    Views: 302

Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
09/29/11 01:02 PM (14 years ago)

Changing the Menu list font

I know this has probably been asked. But I didn't find it in my searching here. -=1.5 iOS, before I forget=- Is it possible to change the font of the text in the menu choices (existing menu list). I have a TTF that I want to use, and I'm guessing it'll have to be addressed in xCode. If not, would it be feasible to create Menu list icons for each entry containing the wanted text using the desired font. (i.e. PNG files, and leaving the actual text blank or hiding it by using the same color font as the background?) Thanks!
 
Dkeller
Aspiring developer
Profile
Posts: 153
Reg: Aug 18, 2011
Saint Augustine
3,680
like
09/29/11 01:07 PM (14 years ago)
It is possible to do these things in the advanced options of the menu screen!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/29/11 02:16 PM (14 years ago)
I think @Stobe is asking about the Font Style...not the font size. There are ways to do this, the difficulty I guess depends on your skill level. In the BT_Layout folder, find the BT_cell_menuList.m file. This is the class file that builds the menu items (each item in the list an instance of BT_menuList.m). This file has a UILabel for the Title (top row) and Description (second row). You'll see where properties of these labels are set starting on around line 310 or so. Text color, font, etc. Have a look at line 310 where it sets the font for the label. This is where your custom font would be added. This article is a great discussion and far better than I could explain... http://shang-liang.com/blog/custom-fonts-in-ios4/
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
09/30/11 06:32 AM (14 years ago)
Thanks! Reading and testing in progress..... sidenote: I think the folder you were referring to above should be BT_Objects ?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
09/30/11 07:55 AM (14 years ago)
Ok, I have partial success.... I made the additions to the BT_info.plist and changed the line in the BT_cell_menuList.m to use UIFont fontWithName:@CustomFontName , but when I run the app in the simulator, I get the font to change to a default font (un-bolded default font) rather than the custom font. Further searching and testing led me to try one of the other included fonts built into ios (Zapfino, in this case), and the line I changed using fontWithName worked. I think my confusion might be where/how to copy the custom TTF font into the xcode project. Some examples say to copy it into the Resources Group, which I didn't find in the BT source. I tried adding it. I tried copying the TTF to the root of the project, I tried the BT_Config folder. None of these seemed to work. I've tried multiple fonts, and made sure I was using the full font name and extension in the plist entry, and the system name in the fontWithName call. Any other suggestions?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
09/30/11 08:05 AM (14 years ago)
hmm... fixed it. I changed the key in the plist from 'Fonts provided by Application' as suggested in the link above, back to 'UIAppFonts' and it worked.
 

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.