Reputation: 53540
To know if an UITextField is empty I used the following code:
if ( [ [textField text] isEqualToString:@""] )
But unfortunately it somehow fails to tell if the text field is empty.
What are the other ways?
When [textField text] is empty, it equals to nil.
Thank you.
Upvotes: 1
Views: 4160