Comparing text in UITextView?

后端 未结 4 983
感动是毒
感动是毒 2021-01-29 10:08

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?

4条回答
  •  没有蜡笔的小新
    2021-01-29 10:38

    First is to compare with the value abc and second is to compare with the String * str.

    [textfield1.text isEqualToString:@"abc"]
    

    or

    [textfield1.text isEqualToString:str];
    

提交回复
热议问题