Closed OxMarco closed 9 years ago
Same problem here
You have to set "presentInView" property with UIView reference, on which you want to show error popup. You can use UITextField superview for this property.
same issue How to set the "presentInView" property with UIView reference?
I was using a subclass of UITableViewCell to hold my TextViewValidator. I wanted to error popup to display in the cell so I did:
class MyCell : UITableViewCell {
@IBOutlet var m_field: TextFieldValidator!
func initializeTextFieldValidator(){
m_field.presentInView = self
}
}
@andrewreeman Thanks for theReplay but where did i use this method "initializeTextFieldValidator". And when i give my_text.presentInView = self it is showing warning like incompactible pointer type.And Result is same error
"presentInView" should take a UIView type. What class is 'self' in your case? If it is a UIViewController you may have to do something like:
presentInView = self.view
In fact if you take a look at the TextFieldValidatorDemo it seems this is what is done in the FormViewController class.
@andrewreeman Thanks for the replay its working.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse constraint format: Unable to interpret '|' character, because the related view doesn't have a superview H:|-0-[popUp]-0-|