How can we compare the text entered in UITextVIew
with my default text in code to determine whether they are both the same or not?
I think this should work for you:
Though this is a case sensitive comparison of string
BOOL boolVal = [textView.text isEqualToString:@"My Default Text"];
Here is how you can do case insensitive comparison of string:
BOOL boolVal = [textView.text compare:@"My Default Text" options:NSCaseInsensitiveSearch]
Here if boolVal
is YES
then you can say that strings are same else they are different.
Hope this helps you.