Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 iOS 中触摸 UITextView 时,我不想出现任何键盘。我怎样才能做到这一点?
您可以使 UITextView 不可编辑。
UITextView* tv = [[UITextView alloc] init]; [tv setEditable:NO];
您可以继承 UITextView 并覆盖“-(BOOL)canBecomeFirstResponder”,返回 NO。