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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?