原理就是自己创建一个uilabel把它添加到navigationbar的titleview,如果要对字体和颜色,大小进行设置,只需在uilabel中更改就可以
CGRect rect = CGRectMake(0, 0, 200, 44);
UILabel *label = [[UILabel alloc] initWithFrame:rect];
label.backgroundColor = [UIColor clearColor];
label.text = @"hhhhhhh";
label.adjustsFontSizeToFitWidth=YES;
self.navigationItem.titleView=label;