最近项目中需要通过判断用户是否对资料进行更改,从而确定是否允许用户提交信息的功能,就以这种方式实现了。
使用前需要实现UITextViewDelegate协议,并设置UITextView的delegate。
- - (void)textViewDidChange:(UITextView *)textView
- {
- NSLog(@"[======]info introduction is %@",textView.text);
- if (![textView.text isEqualToString:profile.introduction]) {
- [self setRightBarButton];
- }else
- {
- [self setRightBarItem:nil];
- }
- }
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。