A few days I received an inquiry from a developer who was having difficulty using an older iOS tutorial demonstrating how to implement an Android style pattern-to-unlock control. So here’s an open source iOS control that allows you to easily implement

Unfortunately there is no way to really lock an iOS device through an app (at least without jailbreaking) because the user can simply press the home button. That being said this could be used as a good way of locking the data within apps containing sensitive data such as personal finance and finance apps.