关于UIViewController self.title在IOS7中默认是黑色且字体稍小的解决办法

时间:2022-09-07 08:17:33

- (void)viewDidLoad

{

    [super viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.

    

    self.title = @" ";

    

    NSDictionary *attributes=[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,[UIFont systemFontOfSize:28],UITextAttributeFont, nil];

    [self.navigationController.navigationBar setTitleTextAttributes:attributes];