导航控制器会改变颜色,然后在从视图中向后转换时恢复为原始颜色?

时间:2014-02-07 16:24:41

标签: ios iphone objective-c uinavigationcontroller uicolor

因此,即使在实际设备上发生这个奇怪的问题,导航控制器的行为在模拟器上正常工作

No issues in the simulator

但在实际设备上会出现此问题。

Issues on an actual Device

现在,在主视图中,我在ViewDidLoad方法中调用[self setupNavigationBar],setupNavigationBar包含:

UIColor * mycolor = [UIColor colorWithRed:0.0 green:120.0/255.0 blue:239.0/255.0 alpha:1];

    [self.navigationController.navigationBar setBarTintColor:mycolor];
    self.navigationController.navigationBar.translucent = YES;
    [self.navigationController.navigationBar setBarStyle: (UIBarStyle)UIStatusBarStyleLightContent];
//    [self.menuButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.menuButton setImage:[UIImage imageNamed:@"Ap_Icons_Basketball_Lines.png"] forState:UIControlStateNormal];
    [self.navigationItem.backBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];

并且mapViewer viewDidLoad方法包含此行

   self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

我无法理解为什么这个问题只发生在这个视图控制器上,我有其他视图控制器可以分割到Web视图,并且更改颜色没有问题。

0 个答案:

没有答案
相关问题