I m getting error Terminating app due to uncaught exception
'NSUnknownKeyException', reason: '[<KGM_IOS.NotEkle 0x7fcb5ee0cd40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key notEkleTextView.'.
I have XIB called "notEkle" and inside of "notEkle" i have UITextView and XIB provider is ViewController. When i connect this text with controller i got this error. I load my XIB in controller like
let notEkleView: UIView = NotEkle().loadNib() as UIView
I connect my text view with controller like
@IBOutlet weak var notEkleTextView: UITextView!
I dont have any problem before connect UITextview and controller.
let notEkleView: UIView = NotEkle().loadNib() as UIView
extension UIView {
func loadNib() -> UIView {
let bundle = Bundle(for: type(of: self))
let nibName = type(of: self).description().components(separatedBy: ".").last!
let nib = UINib(nibName: nibName, bundle: bundle)
return nib.instantiate(withOwner: self, options: nil).first as! UIView
}
}