Simple log for iOS

In every method two very important variables can be found. One is already known by many iOS dev, and it is ‘self’. The other one is ‘_cmd’. This last one is the selector of the current method. This variable can useful for logging purposes. In the Silver Sparrow log framework, it is used inside a macro in order to add important information to a log entry.
For example:
NSLog(@"{ERROR} [%@ %@] %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), message);
In this line, the class name and the method name are added to NSLog.
You can download and use the log library, which is available at SSLoger on GitHub

Passcode Lock Screen for iOS

I have designed a small library (with its test project) that lets you implement a passcode lock screen on iOS. The library is compatible with iPod Touch, iPhone and iPad. And it is very easy to use.
EAPasscodeLock* passcodeManager = [[EAPasscodeLock alloc] init];
UIViewController* plViewController = [passcodeManager passcodeViewControllerWithCode:@"1234" cancellable:YES hintText:nil maxRetries:4 delegate:self];
[self presentModalViewController:plViewController animated:NO];

There is a protocol you should implement, with only one obligatory method, that sends messages to the main view.
@protocol EAPasscodeLockProtocol
@required
// Called when the passcode is entered correctly after dismissing the passcode View Controller
-(void)passcodeDidUnlockedSuccessfully;
@optional
// Called when the passcode is entered correctly before dismissing the passcode View Controller
-(void)passcodeWillUnlockedSuccessfully;
// Called when a passcode entered is incorrect
-(void)passcodeFailedToUnlock;
// Called when the cancel button was pressed and after the passcode View Controller is dismissed
-(void)passcodeLockWillBeCancelled;
// Called when the passcode was entered incorrectly too many times
-(void)passcodeFailedWithTooManyAttempts;
@end
Here a few screenshots of the iPad UI

Empty passcode screen

Typing the code

Wrong passcode message

Find the lastest version on GitHub: https://github.com/eaceto/EAPasscodeLock