swift - How do you color/customize the UIImagePickerController's Navigation Bar? -
what correct way color uiimagepickercontroller's nav bar?
merely tried see background color i'm getting faded color seen in image below; if view obstructing it.
let picker = uiimagepickercontroller() picker.sourcetype = type picker.mediatypes = [kuttypeimage] picker.delegate = self picker.navigationbar.backgroundcolor = uicolor.redcolor()
appears have view obscuring redcolor():
(lldb) po picker.navigationbar.subviews 2 values { [0] = 0x00007fe7bb52a890 [1] = 0x00007fe7bb52b670 }
correct way create solid color navigation bar?
for completeness, i'll add full color customization setup:
let imagepicker = uiimagepickercontroller() imagepicker.navigationbar.translucent = false imagepicker.navigationbar.bartintcolor = .bluecolor() // background color imagepicker.navigationbar.tintcolor = .whitecolor() // cancel button ~ uitabbarbutton items imagepicker.navigationbar.titletextattributes = [ nsforegroundcolorattributename : uicolor.whitecolor() ] // title color
which results in:
Comments
Post a Comment