BZGFormField

A text field with a validity indicator

  • Owner: 0thernet/BZGFormField
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Main metrics

Overview
Name With Owner0thernet/BZGFormField
Primary LanguageObjective-C
Program languageRuby (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2013-09-15 02:31:46
Pushed At2014-09-15 22:19:47
Last Commit At2014-09-15 18:19:46
Release Count5
Last Release Name1.1.2 (Posted on 2014-02-23 20:50:50)
First Release Name1.0.0 (Posted on 2013-10-10 10:48:19)
用户参与
Stargazers Count413
Watchers Count11
Fork Count43
Commits Count38
Has Issues Enabled
Issues Count11
Issue Open Count5
Pull Requests Count7
Pull Requests Open Count0
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private