简体   繁体   English

TextField键盘不显示

[英]TextField Keyboard Does Not Appear

Keyboard is not appearing for the text field on the simulator. 键盘未出现在模拟器上的文本字段中。

Created The textfield. 创建了文本字段。

    txt_UserName = new UITextField {
        Placeholder = "Enter Username",
        BorderStyle = UITextBorderStyle.RoundedRect,
        Font = UIFont.FromName(Constants.KHELVETIC,Constants.KFontSize12),
        VerticalAlignment = UIControlContentVerticalAlignment.Center,
        AutocorrectionType = UITextAutocorrectionType.No,
        AutocapitalizationType = UITextAutocapitalizationType.None,
        ClearButtonMode = UITextFieldViewMode.WhileEditing,
        LeftViewMode = UITextFieldViewMode.Always,
        ReturnKeyType = UIReturnKeyType.Next,
        BackgroundColor = UIColor.White,
        ShouldReturn = delegate {
            txt_Email.BecomeFirstResponder ();
            return true;
            }
        };


    txt_Email = new UITextField {
        Placeholder = "Enter Email",
        BorderStyle = UITextBorderStyle.RoundedRect,
        Font = UIFont.FromName(Constants.KHELVETIC,Constants.KFontSize12),
        VerticalAlignment = UIControlContentVerticalAlignment.Center,
        AutocorrectionType = UITextAutocorrectionType.No,
        AutocapitalizationType = UITextAutocapitalizationType.None,
        ClearButtonMode = UITextFieldViewMode.WhileEditing,
        KeyboardType = UIKeyboardType.EmailAddress,
        LeftViewMode = UITextFieldViewMode.Always,
        ReturnKeyType = UIReturnKeyType.Next,
        BackgroundColor = UIColor.White,
        ShouldReturn = delegate {
            txt_Password.BecomeFirstResponder ();
            return true;
        }
    };

Can't find keyplane that supports type 5 for keyboard iPhone-Portrait-PhonePad; 找不到支持键盘iPhone-Portrait-PhonePad的5型键盘; using 2870935746_Portrait_iPhone-Complex-Pad_Default 使用2870935746_Portrait_iPhone-Complex-Pad_Default

Its show the above message when I select the Textfield. 当我选择Textfield时,它会显示上面的消息。

You need to uncheck the hardware keyboard option so that the keyboard on the emulator pops up . 您需要取消选中硬件键盘选项,以便弹出模拟器上的键盘。 because if you have the hardware keyboard option on you will need to connect a keyboard to you device to check it it is taking that. 因为如果您有硬件键盘选项,则需要将键盘连接到您的设备以检查它是否正在接受它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM