在导航栏中,是否能够更改标题视图的大小?有些我想使用的标题在当前尺寸下无法完全显示,因此我想水平扩展标题视图。目前,我尝试了以下方法:
UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(0,0,500,32)];
[testView setBackgroundColor:[UIColor redColor]];
self.navigationItem.titleView = testView;
不管我把宽度设得多大,它仍然不能扩展到一定点以外。这就是我所看到的: 有没有什么办法可以解决这个问题?感谢您的帮助。
- (void)pushNavigationItem:(UINavigationItem *)item animated:(BOOL)animated;
方法中。 - Avt