GSPasswordInputView密码输入界面
GSPasswordInputView 是一个类似微信支付的密码输入界面。
如何安装
与 CocoaPods 一起安装
CocoaPods是Objective-C的依赖项管理器,它可以自动化并简化在项目中使用第三方库的过程。有关更多详细信息,请参见“入门”部分。
Podfile
platform :ios, '7.0'
pod 'GSPasswordInputView'
用法
- Storyboard
Drag an UIView to your storyboard, set its class to GSPasswordInputView.
That's it!
- 从代码创建
GSPasswordInputView *pwdInputView = [[GSPasswordInputView alloc] initWithFrame:CGRectMake(0, 0, 160, 40)];
pwdInputView.numberOfDigit = 6;
[self.view addSubview:pwdInputView];
- 委托下面的实现代理,在输入完成时被调用;
- (void)didFinishEditingWithInputView:(GSPasswordInputView *)anInputView text:(NSString *)aText;
评论