0

I did not see an answer to my question yet so I ask it : I am currently using (void)customizeappearance to customize the design of my tabbar and navbar. Will that function restrain the use of my app to iOS5-based iPhone only ? If not, will my bars be seen the same in all devices ?

Thanks in advance.

Here is the method I am using :

- (void)customizeAppearance
{
    UIImage *tabBackground = [[UIImage imageNamed:@"bg_tab"]     resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [[UITabBar appearance] setBackgroundImage:tabBackground];
    [[UITabBar appearance] setSelectionIndicatorImage:
    [UIImage imageNamed:@"bg_tab_selected"]];
    [[UITabBar appearance] setSelectedImageTintColor:[UIColor whiteColor]];
}
johnson23
  • 286
  • 2
  • 16

1 Answers1

0

customizeappearance isn't a standard method. What methods are you actually calling to do the customisation?

If you are using methods like setBackgroundImage: or setTintColor: there's a good chance that your app will only run on iOS5 and will crash on iOS4. Post the methods you are using and I'll show you how to do it safely for iOS4.

Here's another answer that explains how to safely call iSO5-only customisation methods so that they won't crash on iOS4: iOS change tabbar item color is safe?

Here's an example of how to customise in a way that works on iOS 4 & 5: tabbar item image and selectedImage

Community
  • 1
  • 1
Nick Lockwood
  • 40,865
  • 11
  • 112
  • 103