Skip to content

Instantly share code, notes, and snippets.

@Behinder
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Behinder/4afd22e65f9c6e1cdece to your computer and use it in GitHub Desktop.
Save Behinder/4afd22e65f9c6e1cdece to your computer and use it in GitHub Desktop.
Change size dynamically of Title Label ios7
self.title = @"Your TiTle Text";
UILabel* tlabel=[[UILabel alloc] initWithFrame:CGRectMake(0,0, 200, 40)];
tlabel.text=self.navigationItem.title;
tlabel.textColor=[UIColor whiteColor];
tlabel.font = [UIFont fontWithName:@"Helvetica-Bold" size: 30.0];
tlabel.backgroundColor =[UIColor clearColor];
tlabel.adjustsFontSizeToFitWidth=YES;
self.navigationItem.titleView=tlabel;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment