具有合理代理方法的 UITextView 替代品。
@protocol ADBReasonableTextViewDelegate <NSObject>
- (void)reasonableTextView:(ADBReasonableTextView *)textView
willChangeText:(BMYCursoredText *)currentText
toText:(BMYCursoredText *)finalText
substitutionText:(NSString *)substitutionText
range:(NSRange)range;
- (void)reasonableTextView:(ADBReasonableTextView *)textView
didChangeText:(BMYCursoredText *)previousText
toText:(BMYCursoredText *)currentText
substitutionText:(NSString *)substitutionText
range:(NSRange)range;
- (void)reasonableTextView:(ADBReasonableTextView *)textView
didChangeSelection:(NSRange)previousSelection
toSelection:(NSRange)finalSelection;
- (void)reasonableTextViewDidBeginEditing:(ADBReasonableTextView *)textView;
- (void)reasonableTextViewDidEndEditing:(ADBReasonableTextView *)textView;
@end
@protocol ADBReasonableTextViewDataSource <NSObject>
- (BOOL)reasonableTextView:(ADBReasonableTextView *)textView
shouldChangeText:(BMYCursoredText *)currentText
toText:(BMYCursoredText *)finalText
substitutionText:(NSString *)substitutionText
range:(NSRange)range;
- (BOOL)reasonableTextView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange;
- (BOOL)reasonableTextView:(UITextView *)textView shouldInteractWithTextAttachment:(NSTextAttachment *)textAttachment inRange:(NSRange)characterRange;
- (BOOL)reasonableTextViewShouldBeginEditing:(ADBReasonableTextView *)textView;
- (BOOL)reasonableTextViewShouldEndEditing:(ADBReasonableTextView *)textView;
@end
根据新 BSD 许可证授权。
版权所有 © 2014, Alberto De Bortoli。保留所有权利。
在以下条件下,允许重新分发和使用源代码和二进制代码,无论是否有更改:* 源代码重新分发必须保留上述版权声明、本许可清单和以下免责声明。* 二进制形式重新分发必须以文档形式或与重新分发提供的其他材料一起复制上述版权声明、本许可清单和以下免责声明。* 未经明确事先书面许可,不得使用 Alberto De Bortoli 或其贡献者的名字来认可或推广由本软件派生的产品。
本软件按“原样”提供,明确不提供任何明示或暗示的保证,包括但不限于适销性和针对特定目的的适用性。在任何情况下,Alberto De Bortoli 不应对任何直接、间接、偶然、特殊、示范性或后果性的损害承担责任(包括但不限于替代商品或服务的采购;使用、数据或利润的损失;或业务的中断)无论如何,即使被告知本软件存在这种损害的可能性。