So when I press the button I check if both the UITextField and the UITextView have some value inside them, but if they are nil then perform this.
So I tried this, but it didn't work:
@IBOutlet weak var defTextView = UITextView
@IBAction func btnTapped(sender: UIButton) {
if let definitionName = defTextView.text {
print(definitionName)
} else {
print("nil")
}
}
Instead of receiving the word "nil" I got empty Strings bring printed