Here I leave a possible solution, but always keep in mind the warning from Apple. In this case, I'm changing the background color of the toolbar, but it should work with any modifications you want.
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
[self changeBakcgroundColorOfView:navigationController.topView withColor:[UIColor redColor]];
}
- (void) changeBakcgroundColorOfView:(UIView *)view withColor:(UIColor*)color{
for (UIView *subview in view.subviews) {
if ([NSStringFromClass([subview class]) isEqualToString:@"UIToolbar"]) {
UIToolbar *toolbar = (UIToolbar *)subview;
toolbar.backgroundColor = color;
toolbar.barTintColor = color;
}
[self changeBakcgroundColorOfView:subview withColor:color];
}
}