Home
1 application Binary restricted distribution Commercial use allowed Can modify source 6 months support Read full license | More Info
Unlimited projects Source and binary distribution Commercial use allowed Distribute modifications 1 year support Read full license | More Info
Starting from $ 49.99
Add an Android style phone unlock interaction to your iOS applications.

With LTDotLock, you will not only have a "dot" keyboard that delegates you everything (and let you make all the work).
LTDotLock allows you to :
You can view a video demonstration of the example application included in the source code here : LTDotLock Demo
To install LTDotLock into your own project, simply drag & drop the folder LTDotLock into it :

Then, ensure to add the QuartzCore framework into your framework list :

LTDotLock offer an optional "special functionnality" : the ability to use the front (or back if not available) camera of the iPhone, iPad or iPod touch to get a picture of the person trying to enter an invalid password.
And of course, this functionnality has been added through the component in a very easy way.
If you want to take benefits of this functionnality, you need to get the component named LTQuickPhotoCapture and add it to your project as specified into its own documentation :

Also, you must take care of the needed frameworks for this specific component :

Finally, you’ll have to uncomment the #define useQuickPhotoCapture line into LTDotLockController.h :

LTDotLock can work in two different ways : "standalone" mode or "manual" mode.
In standalone mode, you’ve got methods asking to save/retrieve passwords in UserPreferences, and to ask for password creation as well as for password lock.
In manual mode, you can set by yourself the passwords the component must wait for, and handle all returning information.
Let’s do it.
If the only thing you want to do is "locking the screen" by asking a password that has been previously automaticaly saved by LTDotLock, then you can use this line to request a DotLock Screen :
[LTDotLockController showAsModalInRootController];
Remember to import the header of the DotLock Controller in your .h file :
#import "LTDotLockController.h"
Calling this method ask LTDotLock to find the actual root controller and to present it a new view controller in modal mode, without any kind of transition.
Finding and using the root view controller ensure you that if you’re actually using special stuffs like UITabBarController, the view will always goes in front of it.
Easy way, go to your AppDelegate.h and add the following line
#import "LTDotLockController.h"
Then go finding the method applicationWillResignActive in your appDelegate.m or create it and add the request to lock the screen :
- (void)applicationWillResignActive:(UIApplication *)application {
[LTDotLockController showAsModalInRootController];
}
Assuming you’ve included the LTDotLockController.h header in your .h file, do the following :
LTDotLockController *dotlock = [LTDotLockController showAsModalInRootController];
This will create an object pointing to the shown viewController.
Then, you’ve go 3 different methods givin you the ability to save & handle 3 different passwords :
For the "Root" Password :
[dotlock recordAndSaveRootPassword];
For the "User" Password :
[dotlock recordAndSaveUserPassword];
For the "Guest" Password :
[dotlock recordAndSaveGuestPassword];
First, your view controller must be a delegate of LTDotLock.
In your .h file, add the following delegate :
LTDotLockControllerDelegate
Second, initialize the component in a way you can tell it that you’ll be its parent (and so it can assume that you want to get notified about averything) :
LTDotLockController *dotlock = [LTDotLockController showAsModalInRootController];
[dotlock setParent:self];
Now, tell LTDotLock that you want to get an image of every recorded password (in the password save mode, not in protection mode) :
[dotlock setReturnSettedImageOfPassword:YES];
Finally, you must implement one (or the three) of the delegates that informs you about the new setted password :
-(void)userPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image
-(void)guestPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image
-(void)rootPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image
You will then receive an UIImage showing the matrix keyboard with the password just like this sample :

We’ve seen in some applications the ability to create different environment regarding the fact that you enter a normal password, a "guest" password or an admin (root) password.
That’s the reason why we’ve implemented this possibility.
Of course, you can only use the "user" password & methods if this is the only functionality you’re looking for.
Spy Capture is a functionnality that will allow you to get informed about the fact that someone entered a bad password, but with this feature and in that case, the front camera of the iPhone / iPad / iPod Touch will be used to take a picture and try to see the person in action. So you will be able to record the given image and show it to the real owner of the iOS device. Note that to use this functionnality, you must have acquire & install LTQuickPhotoCapture component.
Yes, you’ve got the choice to ask for a 3x3 dots matrix or a 4x4 dots version. The resulted password in 3x3 dots mode will come with numbers from 1 to 9, where the 4x4 version will give you numbers from 1 to 9 and letters from A to G

There’s no image. LTDotLock is 100% code designed, that means that you’ve got methods to change every color of every details of the component.

See the methods of LTDotLockController to find the one allowing you to change the colors of your choice.
The matrix keyboard and its working system is declared into LTDotLockView.h & .m Fortunatly, we’ve created it in a way you can use it as a standalone and have your own view set as a delegate of it too, just the way we do with LTDotLockController.
Include LTDotLockView.h into your view controller Set your viewController as a delegate of LTDotLockDelegate Create an UIView from LTDotLockView Use the method setParent to tell the UIView that you’ll receive the delegate calls
Here are the methods you can use to control the view. They are named identicaly as for the LTDotLockController, so please refer to the methods & delegates details below for their explanation :
@property (nonatomic, retain) NSString *currentSequence;
@property (nonatomic, retain) NSString *userCode;
@property (nonatomic, retain) NSString *guestCode;
@property (nonatomic, retain) NSString *rootCode;
//::.. colors methods ..::
- (void)setGridColor:(UIColor *)color;
- (void)setSelectedPathColor:(UIColor *)color;
- (void)setMainColor:(UIColor *)color;
- (void)setDotColor:(UIColor *)color;
- (void)setTouchColor:(UIColor *)color;
- (void)setTouchedColor:(UIColor *)color;
- (void)setHighlightColor:(UIColor *)color;
- (UIColor *)gridColor;
- (UIColor *)selectedPathColor;
- (UIColor *)mainColor;
- (UIColor *)dotColor;
- (UIColor *)touchColor;
- (UIColor *)touchedColor;
- (UIColor *)highlightColor;
//::.. other important methods ..::
- (void)setParent:(NSObject *)_parent;
- (UIImage *)getCurrentPasswordSnapshot;
- (void)setRecordingMode:(BOOL)record;
- (void)setMatrixMode:(dotLockMatrix)mode;
Here are the delegate methods of LTDotLockView :
- (void)returnedCode:(NSString *)code;
- (void)userIdentifiedWithCode:(NSString *)code;
- (void)guestIdentifiedWithCode:(NSString *)code;
- (void)rootIdentifiedWithCode:(NSString *)code;
- (void)badPasswordEnteredWithCode:(NSString *)code;
Texts on LTDotLockController uses the macro command NSLocalizedString to help you having them created into a .strings file and be able to handle localization on this viewController too.
Here are the different declared strings :
Text shown when asking for the password:
NSLocalizedString(@"Please enter your password", @"DotLock - Enter your password")
Text shown when setting a password, and waiting for its confirmation:
NSLocalizedString(@"Now confirm your password", @"DotLock - Password confirmation")
Text shown when asking to set the main (root) password:
NSLocalizedString(@"Please enter the main password", @"DotLock - Password setting for the root password")
Text shown when asking to set the normal (user) password:
NSLocalizedString(@"Please enter your password", @"DotLock - Password setting for the user password")
Text shown when asking to set the guest password:
NSLocalizedString(@"Please enter the guest password", @"DotLock - Password setting for the guest password")
Following are described the methods of LTDotLockController.
LTDotLock controller has been created in a 100% code design way. Following are the methods allowing you to change any kind of color of the dots & matrix :
- (void)setGridColor:(UIColor *)color;
Change the grid color (what is under the dots). You can use [UIColor clearColor] to make it invisible.
- (void)setSelectedPathColor:(UIColor *)color;
Change the grid color path (that means the lines under the dots showing the path of the password).
- (void)setMainColor:(UIColor *)color;
This is the color used to fill the base circle (which is a transparent black color by default)
- (void)setDotColor:(UIColor *)color;
This is the main color used by the dot. A light and a dark value are computed to create a gradient from this color.
- (void)setTouchColor:(UIColor *)color;
This is the color used to change the large circle color & shadow when the dot is currently touched (the user finger is on it).
- (void)setTouchedColor:(UIColor *)color;
This color is used to design the large circle of the dot when it has beed touched/selected.
- (void)setHighlightColor:(UIColor *)color;
This color is used to design a blur effect around the main circle (touchedColor).
- (UIColor *)gridColor;
This is the getter for gridColor.
- (UIColor *)selectedPathColor;
This is the getter for selectedPathColor.
- (UIColor *)mainColor;
This is the getter for mainColor.
- (UIColor *)dotColor;
This is the getter for dotColor.
- (UIColor *)touchColor;
This is the getter for touchColor.
- (UIColor *)touchedColor;
This is the getter for touchedColor;
- (UIColor *)highlightColor;
This is the getter for highlightColor;
- (void)changeBackgroundWithImage:(UIImage *)image;
This function allow you to change the background of the view controller with an image of your choice.
- (void)setParent:(NSObject *)_parent;
This is the setter to tell LTDotLock what view controller is the parent (and will receive the notification delegates of all actions).
Of course, your view controller must be handle LTDotLockControllerDelegate.
- (void)setReturnSettedImageOfPassword:(BOOL)yesno;
If set to YES, then the delegate method (void)????PasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image will be called when a new password is set where ???? can be "root", "user" or "guest" regarding which function has been called to create a new password, and image contains an image showing the created code.
If set to NO, image is nil.
- (void)setReturnSpyImageOnBadPassword:(BOOL)yesno;
If set to YES, and if the LTQuickPhotoCapture component has been installed into your project, then when a user entered a bad password, a picture of him will be taken using the front camera of the iOS device (or the back camera if there’s no front camera) for the real user to be able to identify the "spy".
Then, (void)badPasswordEnteredWithSpyImage:(UIImage *)image will be called instead of (void)badPasswordEntered given the resulted image...
- (void)setMatrixStyle:(dotLockMatrix)style;
Set the matrix keyboard used. You can specify matrix3x3 or matrix4x4 to choose having a 9 dots matrix or a 16 dots version :

- (void)recordRootPassword;
Tell view controller to ask for a root password.

- (void)recordUserPassword;
Tell the view controller to ask for a normal (user) password.

- (void)recordGuestPassword;
Tell the view controller to ask for a guest password.

- (void)recordAndSaveRootPassword;
Same as recordRootPassword but store the password into UserPreferences to be able to automaticaly handle the answers when the screen will be locked.
- (void)recordAndSaveUserPassword;
Same as recordUserPassword but store the password into UserPreferences to be able to automaticaly handle the answers when the screen will be locked.
- (void)recordAndSaveGuestPassword;
Same as recordGuestPassword but store the password into UserPreferences to be able to automaticaly handle the answers when the screen will be locked.
+ (LTDotLockController *)showAsModalInRootController;
This static method allow you to start showing the LTDotLockController. It returns an object to be kept if you want to set different things on it. This method locate the root controller of your main window, then use it to present the view as a modal view (so it works with UITabBarController, etc).
(LTDotLockController *)showAsModalInRootControllerWithAnimation:(UIModalTransitionStyle)animation;
Same as showAsModalInRootController, it can be used to add a showing animation for appearing, according to those available through UIModalTransitionStyle. You can use it for example if you want to ask the user to create its passwords, but it is not recommended to use this to lock the application (because a user will have time to see what’s «under» the lock view and/or to take a snapshot).
Following are described the delegates methods called when you’ve correctly setted your own view controller as a parent. Note that all of those methods are optional.
-(void)userIdentified;
Called when a lockscreen have been successfully unlocked using the "user" password.
-(void)guestIdentified;
Called when a lockscreen have been successfully unlocked using the "guest" password.
-(void)rootIdentified;
Called when a lockscreen have been successfully unlocked using the "root" password.
-(void)userPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image;
Called when you’ve asked the user of your application to create a "user" password, and after its correct creation (password & confirmation). "image" will contain an UIImage of the design of the password if the method (void)setReturnSettedImageOfPassword has been set to YES, it’ll contain nil otherwise.
-(void)guestPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image;
Called when you’ve asked the user of your application to create a "guest" password, and after its correct creation (password & confirmation). "image" will contain an UIImage of the design of the password if the method (void)setReturnSettedImageOfPassword has been set to YES, it’ll contain nil otherwise.
-(void)rootPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image;
Called when you’ve asked the user of your application to create a "root" password, and after its correct creation (password & confirmation). "image" will contain an UIImage of the design of the password if the method (void)setReturnSettedImageOfPassword has been set to YES, it’ll contain nil otherwise.
-(void)badPasswordEntered;
Called when a bad password has been entered on lock screen.
-(void)badPasswordEnteredWithSpyImage:(UIImage *)image;
Called when a bad password has been entered on lock screen, and the method (void)setReturnSpyImageOnBadPassword has been set to YES. Image will contain a picture taken from the front webcam of the iOS device if available, or the rear webcam, or nil if there's no camera available.
-(void)badPasswordConfirmationWhileRecording;
Called when, while setting a new password, the password entered and its confirmation are different.
You will find two different demo programs :
LTDotLock Demo & LTDotLock with Spy Demo
LTDotLock Demo will show you how the component works, with some of the features offered.
LTDotLock Demo is pretty much the same, instead that it is a little bit modified to take advantage of LTQuickPhotoCapture component to show you how works the spy image capture.
As a reminder, for it to work you must hire a licence of LTQuickPhotoCapture.
After that, you’ll just have to add both .h & .m files from this component to the group folder especialy made for it :

Here is what I call a great coded code ! A really great component for your iOS project ! Many thanks to this wonderful project's creator !- Bob Charlet, 4 months ago
Great work and detailed documentation to a point where no need for support is needed. Keep up the good work and I would love to see more projects to come.- Ioannis Economides, 10 months ago
Starting from $ 49.99
Questions & Comments
Leave a comment
Log-in now or register for a free account.
10 months ago
10 months ago
10 months ago