I need to add a 4 digit pin view controller that would “hover” over my app’s main window and prevent users who do not know the pin from browsing data within the app.
I’m interested if there are any demo projects or open source projects that accomplish this functionality (key clicks, automatically changing focus, displaying a static glossy keyboard, lock after x amount of seconds).
Thank you for your input!
Making my own custom alert view, somewhat following this tutorial, I was able to make a PIN-entry view that covers the entire window, thus absorbing all input. I then put code in
applicationWillResignActiveandapplicationDidBecomeActiveto determine how long the app has been minimized for, in order to present the PIN entry window based on the user’s preference settings. Don’t forget, you want to store the PIN in a secure manner, I recommend using the built-in keychain.