如何在弹出框内显示键盘?,ipad 密码锁定样式

发布于 2024-09-17 18:20:25 字数 34 浏览 3 评论 0原文

是否可以像为 ipad 设置密码时显示的方式显示键盘?

Is it posible to present a keyboard the way is shown when you set a passcode for your ipad?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扮仙女 2024-09-24 18:20:25

不幸的是没有,但我所做的复制是,使用界面生成器在我的密码视图中构建了一堆按钮,例如键盘。然后将每个按钮链接到一个可以更改文本字段的命令。

- (IBAction) button9_clicked:(id) sender{

    if ([self textField:theTextField shouldChangeCharactersInRange:range replacementString:@"9"]){
        self.theTextField.text=[self.theTextField.text stringByAppendingString:@"9"];
        range.location = self.theTextField.text.length;
    }
    else 
        range.location = self.theTextField.text.length;
}

Unfortunately no, But what i did to replicate this was, built a bunch of buttons like a keyboard inside my passcode view using interface builder. Then linked each button to a command that would change the text field.

- (IBAction) button9_clicked:(id) sender{

    if ([self textField:theTextField shouldChangeCharactersInRange:range replacementString:@"9"]){
        self.theTextField.text=[self.theTextField.text stringByAppendingString:@"9"];
        range.location = self.theTextField.text.length;
    }
    else 
        range.location = self.theTextField.text.length;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文