Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个模态视图控制器,我希望它的导航栏(我认为是 UINavigationItem)继承其呈现视图控制器的导航栏的颜色。我该怎么做呢?
在呈现模态视图控制器之前设置它。例如:
viewController.navigationController.navigationBar.tintColor = self.navigationController.navigationBar.tintColor; [self presentModalViewController:viewController animated:YES];