Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //set the back arrow and other icons to the title text color for iOS7...
- if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1){
- [self.navigationController.navigationBar setTintColor:[BT_color getColorFromHexString:[appDelegate navBarTitleTextColor]]];
- }
- //////// end setup nav bar
- /////////////////////////////////////////
- NSShadow *shadow = [[NSShadow alloc] init];
- shadow.shadowColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8];
- shadow.shadowOffset = CGSizeMake(0, 1);
- UIColor *myColor = [BT_color getColorFromHexString:@"#6D6C3A"];
- NSDictionary *textola = [NSDictionary dictionaryWithObjectsAndKeys:
- myColor, NSForegroundColorAttributeName,
- shadow, NSShadowAttributeName,
- [UIFont fontWithName:@"AmericanTypewriter" size:21.0], NSFontAttributeName, nil];
- [self.navigationController.navigationBar setTitleTextAttributes:textola];
- UILabel* tlabel=[[UILabel alloc] initWithFrame:CGRectMake(0,0, 200, 40)];
- tlabel.text=navBarText;
- tlabel.textAlignment = NSTextAlignmentCenter;
- tlabel.textColor=[BT_color getColorFromHexString:@"#6D6C3A"];
- tlabel.font = [UIFont fontWithName:@"AmericanTypewriter" size: 21.0];
- tlabel.adjustsFontSizeToFitWidth=YES;
- self.navigationItem.titleView=tlabel;
- //tell iOS7 the top bar needs updated..
- if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1){
- [self setNeedsStatusBarAppearanceUpdate];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement