Set compatibility on other iOS devices

I have not yet seen the answer to my question, so I ask: I am currently using (void) customizeappearance to customize the design of my tab and navigation bar. Will this feature restrict the use of my application on iOS5-based iPhone only? If not, will my bands be the same on all devices?

Thanks in advance.

Here is the method I'm 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]]; } 
0
source share
1 answer

customizeappearance is not a standard method. What methods do you actually invoke to configure?

If you use methods such as setBackgroundImage: or setTintColor: there is a good chance that your application will only work on iOS5 and crash on iOS4. Publish the methods you use and I will show you how to do it safely for iOS4.

Here is another answer that explains how to safely call setup methods only for iSO5 so that they don't fail on iOS4: Is the color of the iOS change menu item safe?

Here is an example of how to customize a method that works on iOS 4 and 5: image of a tab element and selectedImage

0
source

Source: https://habr.com/ru/post/907689/


All Articles