Recently modified projects are based on iOS 5.0 or later, in version iOS 61, the system default Tabbar is black, but this project needs to be compatible with iOS 7 and iOS 8, we all know iOS 7 started, iOS UI entered a flat era, the change is quite large , tabbar default to the white translucent effect, the need to change the Tabbar to black effect, but do not want to change the source code too large, today is not laborious, found a solution.
The first thing to do is to create a Tabbarcontroller object, which is not much to say here.
Here's the main code:
UIView *backview = [[UIView alloc] Initwithframe:cgrectmake (0, 0, +)];backview.backgroundcolor = [Uicolor Blackcolo R]; [Self.tabBarController.tabBar Insertsubview:backview atindex:0];self.tabbarcontroller.tabbar.opaque = YES; [Backview release];
iOS development-No need to customize, modify Tabbar background color