I set the background image of the UINavigationBar
in the root view, but I need to remove the background image on the detail view controller.
With Obj-C, I use this code:
if ([[UINavigationBar class] respondsToSelector:@selector(appearance)]) { [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault]; }
so when I use this code in MonoTouch:
this.NavigationController.NavigationBar.SetBackgroundImage(null, UIBarMetrics.Default);
I get this error:
System.ArgumentNullExeption Argument cannot be null Parameter name: backgroundImage
How to remove background image?
source share