i am using a MPMoviePlayerViewController inside my Project. I have defined the following appearance for UIButtons and UINavigationbar like so:
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil]
setBackgroundImage:[UIImage imageNamed:@"woodenBarButton"]
forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navigationbarBackground"]
forBarMetrics:UIBarMetricsDefault];
So now MPMoviePlayerViewController is also using a navigation bar. The problem is now: The button uses the given appearance but the toolbar not => it looks crappy. So now i have the following questions:
I tried to access the button via playerViewController.navigationitem.leftbarbuttonitem and overwrite properties but that doesn't work.
Would be great if you can help me. Thanks.
have you tried also setting appearanceWhenContainedIn
for MPMoviePlayerViewController
? appearance
and appearanceWhenContainedIn
works both at the same time.
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navigationbarBackground"]
forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearanceWhenContainedIn:[MPMoviePlayerViewController class], nil] setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];