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?
You can use the methods of NSString for this.
1: isEqualToString
: (case-sensitive)
if( [ myString isEqualToString: otherString ] )
{}
2: caseInsensitiveCompare
: (case-insensitive)
if( [ myString caseInsensitiveCompare: otherString ] )
{}
3: localizedCaseInsensitiveCompare
: (case-insensitive and localized)
if( [ myString localizedCaseInsensitiveCompare: otherString ] )
{}