tamtoum1987 tamtoum1987 - 4 months ago 19
Objective-C Question

clearColor make background color black

i want to have a tranparent background in my uiViewController for that i use clearColor like this

colorPickerVc.view.backgroundColor = UIColor.clearColor()
presentViewController(colorPickerVc, animated: true, completion: nil)


the problem when colorPickerVc finish loading the background color become black
i want a solution if possible that work on ios 7 to
thank's for your help




Solution of @good4pc :

colorPickerVc.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext
colorPickerVc.view.backgroundColor = UIColor.clearColor()

worked for me, only problem is that this solution dont work in ios 7

Answer
colorPickerVc.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext
colorPickerVc.view.backgroundColor = UIColor.clearColor()