BZGFormField

A text field with a validity indicator

  • 所有者: 0thernet/BZGFormField
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

BZGFormField

BZGFormField is a text field with a validity indicator. UI/UX inspired by @muffs

alt tag

The left indicator changes color based on the validity of the field's text - just pass the field a text validation block:

[self.passwordField setTextValidationBlock:^BOOL(BZGFormField *field, NSString *text) {
    return (text.length >= 8);
}];

alt tag

When the text field returns, the indicator expands and becomes tappable.

alt tag

When the indicator is tapped, an alert view is displayed - you can configure the alert view in the text validation block.

[self.passwordField setTextValidationBlock:^BOOL(BZGFormField *field, NSString *text) {
    if (text.length < 8) {
        field.alertView.title = @"Password is too short";
        return NO;
    } else {
        return YES;
    }
}];

alt tag

Installation

If you're using cocoapods, add pod 'BZGFormField' to your Podfile. Otherwise, add BZGFormField/BZGFormField.h and BZGFormField/BZGFormField.m to your project.

Usage

Check out the sample Xcode project in Example

主要指标

概览
名称与所有者0thernet/BZGFormField
主编程语言Objective-C
编程语言Ruby (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2013-09-15 02:31:46
推送于2014-09-15 22:19:47
最后一次提交2014-09-15 18:19:46
发布数5
最新版本名称1.1.2 (发布于 2014-02-23 20:50:50)
第一版名称1.0.0 (发布于 2013-10-10 10:48:19)
用户参与
星数413
关注者数11
派生数43
提交数38
已启用问题?
问题数11
打开的问题数5
拉请求数7
打开的拉请求数0
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?