Hi I tried to add an UIImageView in my textField called typeDeProbleme. All works just fine, there's no error shown, except when I try to click on the typeDeProbleme, XCode gives me this in the Target Output:
[Unknown process name] CGContextSetFillColorWithColor: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
let imageView = UIImageView()
let image = UIImage(named: "arrow")
imageView.image = image
imageView.frame = CGRect(x: 0, y: 0, width: 25, height: 15)
imageView.contentMode = .scaleAspectFit
typeDeProbleme.rightViewMode = UITextFieldViewMode.always
typeDeProbleme.rightView = imageView
typeDeProbleme.addSubview(imageView)
I already tried to understand from this CGContextSetFillColorWithColor: invalid context 0x0 but i can't because it's in Objective-C. Therefore, I just want to know, did I missed something here?