MADismissiveTextView处理释放键盘输入

联合创作 · 2023-09-26 19:44

MADismissiveTextView 是 UITextView 的子类用来处理释放键盘输入。

示例代码:

UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 44, 320, 416)];
[self.view addSubview:scrollView];

MADismissiveTextView *textView = [[MADismissiveTextView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
textView.dismissivePanGestureRecognizer = scrollView.panGestureRecognizer;
textView.keyboardDelegate = self;
[self.view addSubview:textView];
浏览 4
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报