self.title = @"title";
[self.navigationController.navigationBar setTitleTextAttributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:19],
NSForegroundColorAttributeName:[UIColor redColor]}];
1、第二种方法
//自定义标题视图
UILabel *navTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 40)];
navTitleLabel.backgroundColor = [UIColor blackColor];
navTitleLabel.font = [UIFont boldSystemFontOfSize:25];
navTitleLabel.textColor = [UIColor greenColor];
navTitleLabel.textAlignment = NSTextAlignmentCenter;
navTitleLabel.text = @"title";
self.navigationItem.titleView = navTitleLabel;
转载请注明出处:http://blog.csdn.net/sevenquan