Search code examples
iphoneobjective-ciosappearance

Is there way to apply customize appearance at once to the whole application?


For example, I have a method:

- (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]];
}

How can I make so that this method worked for whole applications?


Solution

  • If you put this code in your app delegate in the finished lunching method that will effect all the app.

    Pay attention that this will work only on iOS 5