开发者

How to prevent the keyboard from showing (not dismissing) on a TextView?

I would like to know how to DISABLE (not how to dismiss) the iOS keyboard in a TextView. I don`t even want the keyboard to show up when the user touches the TextView.

All of the examples I found were to make the keyboard disappear AF开发者_Python百科TER it appears.

The closest thing I got was to set textView.userInteractionEnabled = NO; but that gets rid of the scrolling as well (I want to keep the scrolling).

Thank you in advance!!


Try to implement the following method in text view's delegate:

- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{
    return NO;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜