TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jan 2018 |
Maintained by Meilbn.
A custom password input like WeChat payment for iOS.
See MLBPasswordTextFieldDemo/MLBPasswordTextFieldDemo.xcworkspace
.
MLBPasswordTextField * textField = [[MLBPasswordTextField alloc] initWithFrame:CGRectMake(0, 0, 240, 40)];
Drag an UITextField to your Storyboard or XIB, set its class to MLBPasswordTextField.
That's it!
If you want to custom, using properties in the Attributes Inspector.
Delegate Implement delegate below to get called when input complete:
- (void)mlb_passwordTextField:(MLBPasswordTextField *)pwdTextField didFilledPassword:(NSString *)password;
MLBPasswordTextField
subdirectory.MLBPasswordTextField.h
.This library requires iOS 7.0+
和 Xcode 8.0+
.
iPhone 5S (iOS 8.3)
iPhone 7 Plus (iOS 10.1.1)
iPhone 6 (iOS 9.3)
iPhone 7 (iOS 10.1)
MLBPasswordTextField is provided under the MIT license. See LICENSE file for details.
一个 iOS 上自定义的密码输入文本框,类似于微信支付。
运行 MLBPasswordTextFieldDemo/MLBPasswordTextFieldDemo.xcworkspace
。
MLBPasswordTextField * textField = [[MLBPasswordTextField alloc] initWithFrame:CGRectMake(0, 0, 240, 40)];
拖拽一个 UITextField
到你的 Storyboard 或者 XIB 中,将其 Class 设置为 MLBPasswordTextField
。
就这样!
如果想自定义,可以使用 Attributes Inspector 中提供的属性。
当输入完成时,可以使用 Delegate 的委托方法来获取回调:
- (void)mlb_passwordTextField:(MLBPasswordTextField *)pwdTextField didFilledPassword:(NSString *)password;
MLBPasswordTextField.h
。该项目最低支持 iOS 7.0+
和 Xcode 8.0+
。
iPhone 5S (iOS 8.3)
iPhone 7 Plus (iOS 10.1.1)
iPhone 6 (iOS 9.3)
iPhone 7 (iOS 10.1)
MLBPasswordTextField 使用 MIT 许可证,详情见 LICENSE 文件。