lady_di
Aspiring developer
Profile
Posts: 31
Reg: Feb 06, 2013
Geelong, VIC
310
10/04/13 06:22 PM (12 years ago)

Font Change not working

Hi I am wishing to change font through out my app to Copperplate. I have change coding in Bt_ceel_menulist.m under //set title Changed [UIFont boldSystemFontOfSize:titleFontSize]]; to [UIFont fontWithName:@"Copperplate" size:titleFontSize]]; No errors are coming up in Xcode and the simulator build comes up as successful however I now have no text in my simple menus throughout the app and the titles have remained however the font has not changed to Copperplate?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/04/13 08:00 PM (12 years ago)
Does your app recognize the font? You need to enter it into the app's plist as well. https://www.buzztouch.com/files/howtos/btcustomfonts.pdf Cheers! -- Smug
 
lady_di
Aspiring developer
Profile
Posts: 31
Reg: Feb 06, 2013
Geelong, VIC
310
like
10/05/13 02:49 AM (12 years ago)
Thank you, great link. Followed the steps and now have an error when building Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/05/13 03:48 PM (12 years ago)
Hmm.. That's very odd. I'd check your plist again to ensure it's correctly entered. I can't imagine why Xcode would fail. Is there any more information available? Cheers! -- Smug
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
like
10/10/13 09:17 PM (12 years ago)
Wow smug, I didn't know you did tutorials. Is this the only one you have, or are there others?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/10/13 11:13 PM (12 years ago)
Once Niraj turned me on to 'Clarify' I've written a few, mostly on subjects that I needed to do anyway, so documenting while I went along made it fairly easy. I don't have a library, but all the decent stuff made it into the How To section here. Please feel free to critique anything I've done; I try to capture all the steps, but sometimes my fingers forget things. Cheers! -- Smug
 
Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
like
11/10/13 08:48 AM (12 years ago)
@smug I followed all the steps in your tutorial. But I have some confusion in the last 2 steps. First in which file I should change the code to put the custom font and secondly where should I add code to 'view will appear' method? Thanks in Advance, Adnan
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/10/13 03:57 PM (12 years ago)
1) Anywhere you want to. for instance, if you want to change the menu bar font, you would make the change in your BT_viewUtilities.m file. look for where it gets the json variables for 'navbartitletext' and set your font to the VC text attributes: theViewController.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"MyCoolFontName" size:20], UITextAttributeFont, nil]; 2) you add the code to the viewWillAppear method for any convenient plugin. Just add that code, open the screen, and check the log for the listing of fonts available. Cheers! -- Smug
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
12/18/13 12:18 PM (12 years ago)
Just wanted to edit to this..For iOS 3.0 Core the code goes into: BT_ViewController.m Try line: 367 or so and copy/paste the following.. self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"Copperplate" size:22], UITextAttributeFont, nil];
 

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.