gpt4 book ai didi

ios - UINavigationItem模态如何从presentingviewcontroller继承颜色

转载 作者:行者123 更新时间:2023-11-29 04:35:21 24 4
gpt4 key购买 nike

我有一个模态视图 Controller ,我希望它的导航栏(我认为 UINavigationItem)继承其呈现 View Controller 的导航栏的颜色。我该怎么做?

最佳答案

在呈现模态视图 Controller 之前设置它。例如:

viewController.navigationController.navigationBar.tintColor = self.navigationController.navigationBar.tintColor;
[self presentModalViewController:viewController animated:YES];

关于ios - UINavigationItem模态如何从presentingviewcontroller继承颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11126221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com