【问题标题】:TextField Keyboard Does Not Appear文本字段键盘不出现
【发布时间】:2014-09-26 09:15:42
【问题描述】:

模拟器上的文本字段没有出现键盘。

创建了文本字段。

    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;
        }
    };

找不到支持键盘 iPhone-Portrait-PhonePad 的 type 5 的键盘;使用 2870935746_Portrait_iPhone-Complex-Pad_Default

当我选择文本字段时,它会显示上述消息。

【问题讨论】:

  • 问题不清楚。
  • 转到IOSsimulator中的硬件菜单>> KeyBorad >>取消选中“连接硬件键盘”

标签: iphone ios7 xamarin.ios xamarin ios8


【解决方案1】:

您需要取消选中硬件键盘选项,以便模拟器上的键盘弹出。 因为如果您有硬件键盘选项,则需要将键盘连接到您的设备以检查它是否正在使用它。

【讨论】:

    猜你喜欢
    • 2018-12-29
    • 2017-01-29
    • 2014-10-30
    • 1970-01-01
    • 2020-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-08
    相关资源
    最近更新 更多