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