例如,我有一個方法:是否有辦法一次將自定義外觀應用於整個應用程序?
- (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]];
}
我怎樣才能讓使用此法工作了整個應用程序?
yeap,它的作品) – RomanHouse 2012-08-17 07:51:32
熱門答案!但只是一個額外的評論 - 請檢查參考 - 他們建議使用「應用程序:didFinishLaunchingWithOptions:」。請參閱:http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html – user387184 2012-08-17 08:08:57