- (void)setTitle:(NSString *) title
{
[super setTitle:title];
UILabel *titleView = (UILabel *)self.navigationItem.titleView;
if(!titleView){
titleView = [[UILabel alloc] initWithFrame:CGRectZero];
titleView.backgroundColor = [UIColor clearColor];
titleView.font = [UIFont boldSystemFontOfSize:20.0];
titleView.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
titleView.textColor = [UIColor blackColor];
self.navigationItem.titleView = titleView;
}
titleView.text = title;
[titleView sizeToFit];
}
这个群里找的,是图片,我一个个的码上去的。。。