0
我试图自定义一个tabbar,我使用下面的代码来改变背景。UITabBar setBackgroundImage not working
UIImage *TabBarControllerBackground = [UIImage imageNamed:@"ios7TabBarBackground"];
[[UITabBar appearance] setBackgroundImage:TabBarControllerBackground forBarMetrics:UIBarMetricsDefault];
我得到以下错误:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIAppearance setBackgroundImage:forBarMetrics:]: unrecognized selector sent to instance 0x1e868a80'
这是为什么?它很适合改变我的导航栏。
你想改变tabbar tint color吗? – Purva