//自定义标题视图
self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0, 200, 44)];
self.titleLabel.backgroundColor = [UIColor clearColor];
self.titleLabel.font = [UIFont boldSystemFontOfSize:18];
self.titleLabel.textColor = [UIColor whiteColor];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = self.titleLabel.title;
self.navigationItem.titleView = self.titleLabel;