iphone - 文本字段键盘不出现

标签 iphone ios7 xamarin.ios xamarin ios8

模拟器上的文本字段未显示键盘。

创建了文本字段。

    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 键盘类型 5 的键板;使用 2870935746_Portrait_iPhone-Complex-Pad_Default

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

最佳答案

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

关于iphone - 文本字段键盘不出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26056061/

相关文章:

xamarin - 是否可以为不同的客户构建 Xamarin 多平台应用程序项目?

ios - 以编程方式将方向从横向模式更改为纵向模式 xamarin IOS

ios - 对于大滚动区域,使 UITableView 单元格的宽度小于 UITableView

javascript - 在viewDidLoad中调用UIWebView的stringByEvaluatingJavaScriptFromString是否正确?

iphone - 帮助!如何在 Controller 之间共享 NSXMLParser 类?

ios7 - 我如何从 UIViewController 移动到 myScene?

ios - 允许以编程方式访问图库照片

ios - 在 Sprite Kit 中暂停游戏

iphone - iOS5 中的自定义 UIalertView

c# - 在 iOS Xamarin 中显示秒、分钟和小时的计时器