所以我创建了一个 UITabBarController 作为我的根控制器,然后添加 UINavigationController 作为标签栏项目,并将 UIViewController 作为导航项目。
我想设置一个图像而不是导航项标题,所以我在 UIViewController 的 viewDidLoad 中尝试了以下操作,但没有成功:
UIImage *image = [UIImage imageNamed:@"logo.png"];
self.navigationItem.titleView = [[UIImageView alloc] initWithImage:image];
有什么建议么?
对不起我的英语不好。