iphone - Set UIBarStyle of UIImagePickerController -
i set bar style of uiimagepickercontroller
following, bar still uibarstyleblacktranslucent
. possible set bar style of uiimagepickercontroller
? in advance!
uiimagepickercontroller *imagepicker = [[uiimagepickercontroller alloc] init]; imagepicker.sourcetype = uiimagepickercontrollersourcetypephotolibrary; imagepicker.navigationbar.barstyle = uibarstyleblack;
edit 1
i can set tint color through:
imagepicker.navigationbar.tintcolor = uicolorfromrgb(0xcc6600);
here's worked me (you need test class of navigationcontroller, not viewcontroller being presented, , need set non-transparent background color seems)
- (void)navigationcontroller:(uinavigationcontroller *)navigationcontroller willshowviewcontroller:(uiviewcontroller *)viewcontroller animated:(bool)animated { if ([navigationcontroller iskindofclass:[uiimagepickercontroller class]]) { navigationcontroller.navigationbar.barstyle = uibarstyleblack; navigationcontroller.navigationbar.backgroundcolor = [uicolor blackcolor]; } }
Comments
Post a Comment