gpt4 book ai didi

iphone - 有没有办法立即将自定义外观应用于整个应用程序?

转载 作者:行者123 更新时间:2023-11-28 19:16:03 25 4
gpt4 key购买 nike

比如我有一个方法:

- (void)customizeAppearance
{
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0],
UITextAttributeTextColor,
[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8],
UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Arial-Bold" size:0.0],
UITextAttributeFont,
nil]];
}

我怎样才能让这个方法适用于整个应用程序?

最佳答案

如果您将这段代码放在您的应用程序委托(delegate)中的 finished lunching 方法中,这将影响所有应用程序。

注意这只适用于 iOS 5

关于iphone - 有没有办法立即将自定义外观应用于整个应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12001655/

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