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;
- Easy to use
- Use with Storyboards, XIBs, Code
- Design in Storyboard or XIB
- 0.0.2 Bug Fixes. Draw border and dot more precision.
- 0.0.1 First version. Contains common features.
- Add
pod 'MLBPasswordTextField'
to your Podfile. - Run
pod install
orpod update
. - Import <MLBPasswordTextField/MLBPasswordTextField.h>.
Not yet supported.
- Download all the files in the
MLBPasswordTextField
subdirectory. - Add the source files to your Xcode project.
- Import
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;
- 使用简单
- 可以在 Storyboards、XIB 中使用,当然也可以通过代码创建
- 可以在 Storyboard 或者 XIB 中配置自定义属性
- 0.0.2 Bug 修复。更加精确地画边框和点。
- 0.0.1 第一版。
- 在 Podfile 中添加
pod 'MLBPasswordTextField'
。 - 运行
pod install
或pod update
。 - 导入 <MLBPasswordTextField/MLBPasswordTextField.h>。
暂未支持。
- 下载 MLBPasswordTextField 文件夹内所有源文件。
- 将 MLBPasswordTextField 文件夹内所有源文件添加(拖入)到你的工程中。
- 导入
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 文件。