Currently, I test whether a UITextView is dirty or not by:
if ([self.textView.undoManager canUndo]) ...
Is this always correct? Or is there any isDirty-like method in UITextView?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can listen to lots of things with the
UITextViewDelegateCheck out the UITextViewDelegate documentation for comprehensive details
- (void)textViewDidBeginEditing:(UITextView *)textView- (void)textViewDidEndEditing:(UITextView *)textView- (void)textViewDidChange:(UITextView *)textViewThere’s more to do with
shouldBeginandshouldEndediting, and also selection changes.Hope that helps out.