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.
我正在开发一个带有 UITextView 的应用程序。我想用钥匙代替return键盘上的Done钥匙。我找到了它的代码,但它是用于 UITextField 而不是 UITextView。
returnKeyType您可以使用属性更改返回键
returnKeyType
UITextView *textview = [[UITextView alloc] initWithFrame:CGRectMake(0.f, 0.f, 120.f, 40.f)]; textview.returnKeyType = UIReturnKeyDone; [self.view addSubview:textview];
问候, KL94