Hot to customize navigation bar that appear on "More" tab in UITabBarController to have 2 px line (开发者_开发百科in different color) as bottom border?
I created subclass of the UINavigationBar that overrides drawrect: method with drawing of that line, and that works for first four tabs, except tabs that are under more navigation controller.
Any help?
#import <objc/runtime.h>
And dynamically set the class of the more view controller's navigation bar:
object_setClass(yourTabBarController.moreNavigationController.navigationBar,
[YourNavigationBarSubClass class]);
If you wanna change the background image you can do it inserting a UIImageView in the default navigation bar
[self.navigationController.navigationBar addSubview:[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"navBar"]]];
精彩评论