Pav*_*nen 7 xcode uipickerview uitextfield ios inputview
我曾经为我inputView展示uipickerview过textfield,但我也用它来做textfield其他功能.我如何能显示标准键盘我用后inputView为textfield?
textfield.inputView = pickrView;
Run Code Online (Sandbox Code Playgroud)
小智 5
正如Pavel Kaljunen所说,你只需要将inputView设置为nil,但是当键盘已经可见时,你必须首先使用resignFirstResponder,将inputView设置为nil然后再次设置为FirstResponder.
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.35];
[yourTextField resignFirstResponder];
yourTextField.inputView = nil;
[yourTextField becomeFirstResponder];
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5321 次 |
| 最近记录: |