![](/img/trans.png)
[英]How to call a function in an another view controller in Xamarin.ios?
[英]How to make numeric keyboard appear on entry of view controller in Xamarin.iOS?
我想使數字鍵盤出現在視圖控制器的條目上。 我需要在后端添加些什么,並將其放入ViewDidLoad()中?
謝謝,喬希
在視圖中的任何UITextField(或其他鍵盤控件)上調用成為FirstFirstResponder
myUITextField.BecomeFirstResponder();
您可以設置UITextField的KeyboardType並調用BeginFirstResponder來顯示鍵盤。
yourUITextField.KeyboardType = UIKeyboardType.NumberPad;
yourUITextField.BecomeFirstResponder();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.