gpt4 book ai didi

iOS 7 - 导航栏项目文本颜色

转载 作者:行者123 更新时间:2023-11-28 20:09:50 27 4
gpt4 key购买 nike

我在 iOS7 上遇到导航栏项目的文本颜色问题。

在我展示一个 View Controller 之前,一切都很好,从那时起,所有导航栏项目的文本颜色都是灰色的。您对这个问题有任何经验吗?

用于呈现VC的代码:

[passcodePopover presentPopoverFromRect:CGRectMake([UIScreen mainScreen].bounds.size.width/2 ,currentWindow.frame.size.height/2,1,1)
inView:currentWindow
permittedArrowDirections:0 animated:NO];[passcodePopover presentPopoverFromRect:CGRectMake([UIScreen mainScreen].bounds.size.width/2 ,currentWindow.frame.size.height/2,1,1)
inView:currentWindow
permittedArrowDirections:0 animated:NO];

最佳答案

//call the below code in ViewDidLoad /It works fine in iOS7

UILabel *navLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0, 320, 100)];
navLabel.backgroundColor = [UIColor clearColor];
navLabel.text = @"Event Details";
navLabel.textColor = [UIColor whiteColor];
navLabel.shadowOffset = CGSizeMake(0, -2);
[navLabel setFont:[UIFont boldSystemFontOfSize:16]];
navLabel.textAlignment = NSTextAlignmentCenter;
self.navigationItem.titleView = navLabel;

关于iOS 7 - 导航栏项目文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20736975/

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