How to present keyboard inside popover?, ipad passcode lock style

无人久伴 提交于 2019-12-30 10:18:07

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/3636560/how-to-present-keyboard-inside-popover-ipad-passcode-lock-style

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!