UITextViewDelegate详解

1.//在text view获得焦点之前会调用textViewShouldBeginEditing: 方法。

- (BOOL)textViewShouldBeginEditing:(UITextView *)textView;

2.//当text view失去焦点之前会调用textViewShouldEndEditing

- (BOOL)textViewShouldEndEditing:(UITextView *)textView;

3.//当text view获得焦点之后,并且已经是第一响应者(first responder),那么会调用textViewDidBeginEditing: 方法

- (void)textViewDidBeginEditing:(UITextView *)textView;

4.////结束编辑

- (void)textViewDidEndEditing:(UITextView *)textView;

5.////内容将要发生改变编辑

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;

6.////内容发生改变编辑

- (void)textViewDidChange:(UITextView *)textView;

7./////焦点发生改变

- (void)textViewDidChangeSelection:(UITextView *)textView;

8.///指定范围的内容与 URL 将要相互作用时激发该方法——该方法随着 IOS7被使用;

- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange NS_AVAILABLE_IOS(7_0);

9.- (BOOL)textView:(UITextView *)textView shouldInteractWithTextAttachment:(NSTextAttachment *)textAttachment inRange:(NSRange)characterRange NS_AVAILABLE_IOS(7_0);textView指定范围的内容与文本附件将要相互作用时,自动激发该方法——该方法随着 IOS7被使用;

你可能感兴趣的:(UITextViewDelegate详解)