ios - Crash app when call setUnselectedItemTintColor from UITabBar -
i've tried both line bellow cause [uitabbar setunselecteditemtintcolor:]: unrecognized selector sent instance
[self.tabbar setunselecteditemtintcolor:[uicolor blackcolor]]; [[uitabbar appearance] setunselecteditemtintcolor:[uicolor blackcolor]];
any suggestion?
this method available on ios 10 only, crash on previous versions. should check method availability before calling it.
if ([[uitabbar appearance] respondstoselector:@selector(setunselecteditemtintcolor:)]) { [[uitabbar appearance] setunselecteditemtintcolor:[uicolor blackcolor]]; }
Comments
Post a Comment