【发布时间】:2011-06-09 19:16:14
【问题描述】:
我正在开发一个带有 UITextView 的应用程序。我想用 Done 键替换键盘上的 return 键。我找到了它的代码,但它是用于 UITextField 而不是 UITextView。
【问题讨论】:
标签: iphone objective-c keyboard keyboard-layout
我正在开发一个带有 UITextView 的应用程序。我想用 Done 键替换键盘上的 return 键。我找到了它的代码,但它是用于 UITextField 而不是 UITextView。
【问题讨论】:
标签: iphone objective-c keyboard keyboard-layout
您可以使用returnKeyType 属性更改返回键
UITextView *textview = [[UITextView alloc] initWithFrame:CGRectMake(0.f, 0.f, 120.f, 40.f)];
textview.returnKeyType = UIReturnKeyDone;
[self.view addSubview:textview];
问候,
KL94
【讨论】: