GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - imengX/XCTextField: A general UITextField category for input checking.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
XCTextFieldDemo
XCTextFieldDemo
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
sample.gif
sample.gif
 
 

Repository files navigation

XCTextField

A general UITextField category for input checking.

Whatever in which way your textField was created, just add the following methods:

For configuration: - configurationWithType:

For check: - inputCheckForceCorrect:

Usage:

  1. Download zip or clone the repo.
  2. Drag the folder XCTextField into your project.
  3. #import "UITextField+XCTextField.h"
  4. Have fun.

Sample GIF:

Sample Code:

/**
  some button action such as commit / login / register etc.
 */
- (void)checkButtonAction:(UIButton *)button {
    for (UIView *subview in self.view.subviews) {
        if ([subview isKindOfClass:[UITextField class]]) {
            [(UITextField *)subview inputCheckForceCorrect:YES];
        }
    }
}

- (void)inputCheckForceCorrect: param: flag if YES the first incorrect textField became first responder.

Paraphrase:

  • XCTextFieldTypeDefault: Style None.
  • XCTextFieldTypeCellphone: PRC mainland Cellphone number style. UIKeyboardTypePhonePad.
  • XCTextFieldTypeEmail: Email format should be "[email protected]". UITextContentTypeEmailAddress.
  • XCTextFieldTypePassword: Security text. UIKeyboardTypeASCIICapable.
  • XCTextFieldTypeCAPTCHA: //@todo:
  • XCTextFieldTypeCreditCard: //@todo: Luhn algorithm
  • XCTextFieldTypeIDCard: 18 digital PRC resident ID card number verify. The last character was calculated base on "ISO 7064:1983.MOD 11-2" algorithm.

About

A general UITextField category for input checking.

Resources

Readme
License
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.