Setting font and font-size of title bar text in a UITableViewController
iphone, objective-c
Solution
the proper way to resize the title text of a navcontroller is to set the titleView property of the navigationItem
like this (in viewDidLoad)
UILabel* tlabel=[[UILabel alloc] initWithFrame:CGRectMake(0,0, 300, 40)];
tlabel.text=self.navigationItem.title;
tlabel.textColor=[UIColor whiteColor];
tlabel.backgroundColor =[UIColor clearColor];
tlabel.adjustsFontSizeToFitWidth=YES;
self.navigationItem.titleView=tlabel;
Problem
I have a simple navigation based application for the iphone/objective-c within various UIViewControllers that are pushed into view, I can set the text in the title bar using something like ``` self.title = @"blah blah blah" ``` Is there a way to control the font and font-size of the title in the title bar text? thanks!