TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jan 2016 |
Maintained by viniciusmo.
An inputmask helps the user with the input by ensuring a predefined format. This can be useful for dates, numerics, phone numbers etc
@interface VViewController ()
@property (weak,nonatomic) IBOutlet VMaskTextField * maskTextField;
@end
@implementation VViewController
- (void)viewDidLoad{
//Telephone with Code Area
self.maskTextField.mask = @"(##) ####-####";
self.maskTextField.delegate = self;
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
return [_maskTextField shouldChangeCharactersInRange:range replacementString:string];
}
@end
VMaskTextField is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "VMaskTextField"
or copy VMaskTextField.h and VMaskTextField.m to your project folder.
viniciusmo, [email protected]
VMaskTextField is available under the MIT license. See the LICENSE file for more info.