简体   繁体   中英

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; using 2870935746_Portrait_iPhone-Complex-Pad_Default

Its show the above message when I select the 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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