当我从iOS应用程序的起始屏幕(推送设置屏幕)推出新的tableViewController时,UINavigationController中的标题会被裁剪,直到动画完成为止。这是动画中的NavigationBar,在动画即将完成时,它看起来像这样:(插入图片1)。片刻之后,标题正确地更改为“设置”。 这不是什么大问题,但你可以想象一下,这会让一个稍微有点强迫症倾向的程序员感到多么困扰! :) 这是在tableViewController中设置标题的代码,没有什么特别之处:
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self) {
self.title = @"Settings";
// Hide tabBar when pushed so you cannot switch from the Settings
self.hidesBottomBarWhenPushed = YES;
self.tableView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"bg.png"]];
}
return self;
}
UINavigationBar
,UINavigationItem
,UINavigationController
? - Ander