更新时间:2023-12-02 22:22:46
虽然晚了,但还是希望能帮到别人.我在 viewDidAppear:animated 中使用了 Stephens 代码,导航栏在返回选项卡时保持不变.这使我可以在导航栏上方使用徽标.我在 viewController 中使用了它.
Although late, I hope this can still help someone else out. I used Stephens code inside viewDidAppear:animated and the navigation bar stays put upon traveling back to the tab. This allowed me to use a logo above the navigation bar. I used this inside my viewController.
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.navigationController.view.frame = CGRectMake(0.0, 100.0, 320.0, 426.0);
self.navigationController.navigationBar.frame = CGRectMake(0.0, 0.0, 320.0, 44.0);
[self loadData];
}