Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 69

TheCloudMediaGroup
Aspiring developer
Profile
Posts: 33
Reg: Nov 23, 2012
Spokane
3,380
06/03/13 04:14 PM (12 years ago)

Custom Font for Menu Items

I am trying to figure out how to implement a different font type for my RSS plugin for BTM. I have the ttf file but am not sure how to change the font for the RSS items. How can you change the system font for the app? Can you set specific font types per screen or for the whole app?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/03/13 07:01 PM (12 years ago)
It would depend on the element in which you wish to use it. In a table cell? cell.textLabel.font = [UIFont fontWithName:@"SmugFont" size:17.0]; Just google the object type (UILabel, UITableViewCell, etc) and "Font (Type, Style, Size...)" and there is usually a quickie fix on Stack Overflow. Cheers! -- Smug
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/03/13 11:56 PM (12 years ago)
Yeah - the tricky thing here is that the rd_simplerss plugin (assuming that's what you're using) doesn't have a custom cell class. Instead, it makes use of the BT_cell_menuList class. In the related .m file, you'll see this around line 313: //set title [titleLabel setFont:[UIFont boldSystemFontOfSize:titleFontSize]]; You can change the font there using Smug's method. BUT...it will also change the font for any menu plugins that make use of the BT_cell_menuList class. I think that's just the "menu simple" plugin and the "circle view" plugin. But, there could be another one or two I'm missing.
 
DryFrog
Lost but trying
Profile
Posts: 42
Reg: Jun 26, 2012
São Paulo
4,620
like
06/19/13 10:01 AM (12 years ago)
Hi guys, @chris1 I'm trying to change the fontTitle on CR_menu_Advanced.m. Any hint on how to do that? I'm trying using this line of code: [titleLabel setFont:[UIFont fontWithName:@"Lobster 1.3" size:17.0]]; Thanks in advance, Cheers dryFrog
 

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.