| 1234567891011121314151617181920212223 |
- //
- // MentionTextView.h
- // AIIM
- //
- // Created by qitewei on 2025/5/30.
- //
- #import <UIKit/UIKit.h>
- NS_ASSUME_NONNULL_BEGIN
- @interface MentionTextView : UITextView
- @property (nonatomic, strong) NSArray<NSValue *> *mentionRanges;
- @property (nonatomic, copy) void (^mentionTapHandler)(NSString *mention);
- @property (nonatomic, copy) void (^mentionDeleteHandler)(NSString *deletedMention, NSUInteger originalIndex);
- - (void)setup;
- - (BOOL)deleteMentionAtCursorPosition;
- ///手动删除指定位置的@用户名
- - (void)deleteMentionAtIndex:(NSUInteger)index;
- @end
- NS_ASSUME_NONNULL_END
|