CocoaPods trunk is moving to be read-only. Read more on the blog, there are 12 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Mar 2015 |
Maintained by Martin Kautz.
MKInputBoxView is a class to replace UIAlertView. It is basically an Objective-C port of BMInputBox, which is written in Swift.
Built in Objective-C for iOS 8.0 and above. ARC-enabled. For both iPhone and iPad.
MKInputBoxView *inputBoxView = [MKInputBoxView boxOfType:NumberInput];
[inputBoxView show];Available styles:
PlainTextInput - Simple text fieldNumberInput - Text field accepting numbers only - numeric keyboardPhoneNumberInput - Text field accepting numbers only - phone keyboardEmailInput - Text field accepting email addresses - email keyboardSecureTextInput - Secure text field for passwordsLoginAndPasswordInput - Two text fields for user and password entryChanging the blur effect (UIBlurEffectStyle: ExtraLight, Light, Dark).
[inputBoxView setBlurEffectStyle:UIBlurEffectStyleDark];Set title and message.
[inputBoxView setTitle:@"Who are you?"];
[inputBoxView setMessage:@"Please enter your username and password to get access to the system."];Set text of the buttons
[inputBoxView setSubmitButtonText:@"OK"];
[inputBoxView setCancelButtonText:@"Cancel"];Decimals for the NumberInput type. Default is 0. If set, the user input will be converted to Double with 2 decimals.
[inputBoxView setNumberOfDecimals:2];Easy way to manipulate the textField's properties.
inputBoxView.customise = ^(UITextField *textField) {
textField.placeholder = @"Your eMail address";
if (textField.secureTextEntry) {
textField.placeholder = @"Your password";
}
textField.textColor = [UIColor whiteColor];
textField.layer.cornerRadius = 4.0f;
return textField;
};inputBoxView.onSubmit = ^(NSString *value1, NSString *value2) {
NSLog(@"user: %@", value1);
NSLog(@"pass: %@", value2);
};inputBoxView.onCancel = ^{
NSLog(@"Cancel!");
};