Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think you may have better luck using a full <code>UIViewController</code> instance instead of a <code>UIActionSheet</code>. Adding keyboard behavior to an action sheet will be difficult if not impossible.</p> <p>If you create a <code>UIViewController</code> subclass, you can make your application delegate present it in <code>-application:didFinishLaunchingWithOptions:</code>. Assuming you're using some sort of <code>UIViewController</code> or <code>UINaviagtionController</code> for your main interface, you could have the password view controller presented modally at startup using <code>UIViewController</code>-<code>presentModalViewController:animated:</code>.</p> <p>Once you have your password view controller, you'll need to add a <code>UITextField</code> for password entry. Make the text field become <code>firstResponder</code> (by calling <code>becomeFirstResponder</code> on it), and that will cause the keyboard to be displayed. You may also want to set the <code>keyboardAppearance</code> property on the text field to control how the keypad appears if for example you want to limit to a numeric PIN versus a full password. Setting the <code>secureTextEntry</code> property may also be desirable to prevent the actual password from being display. See the <code>UITextInputTraits</code> protocol on <code>UITextField</code> for both of those options.</p> <p>In order to make the app secure, you would create your password view controller so that it has no buttons or navigation options other than a "Submit" or "Login" type button. If the user enters the correct password, you dismiss the modal view controller and let them in. If they don't know the password, their only choice is to tap the Home button to exit your application as they'd have no way to proceed beyond the modal view controller.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload