MADismissiveTextView处理释放键盘输入
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];
评论