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

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -