Reputation: 2613
I'm currently trying to create a more saturated NavigationBar in a storyboard application. Therefore I want to subclass UINavigationBar but the init method of my NavigationController(rootViewController) isn't called.
- (id)init {
self = [super initWithNavigationBarClass:[CRNavigationBar class] toolbarClass:nil];
if(self) {
// Custom initialization here, if needed.
}
return self;
}
I've already tried to achieve that within my viewDidLoad method but that was leading to rendering bugs (z-order)
Upvotes: 1
Views: 1605
Reputation: 3327
Go to your storyboard. Select your Navigation Controller Scene
. Beneath your Navigation Controller
, there is the Navigation Bar
item. Select it. In the Utilities Panel
(on the right), select the Identity Inspector
(3rd tab). Set your subclass of UINavigationBar
as the Custom Class
.
Upvotes: 6