Latest 0.1.0
Homepage https://github.com/LeoMobileDeveloper/LHInfoTextfield
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version

Gif

LHInfoTextfield

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • ARC

Installation

LHInfoTextfield is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LHInfoTextfield"

How to use

In the file that you want to use

    #import "UITextField+LHInfo.h"

Add a condition

[self.textfield lh_addObserverWithCondition:^BOOL(UITextField *textfield) {
    return textfield.text.length > 8;
} Config:^(LHAnchorView *anchorView) {
    anchorView.borderColor = [UIColor redColor];
    anchorView.textColor = [UIColor redColor];
} Infomation:@"HaHa length is greater that 8"];

[self.textfield lh_addObserverWithCondition:^BOOL(UITextField *textfield) {
    return textfield.text.length > 6;
} Config:^(LHAnchorView *anchorView) {
    anchorView.borderColor = [UIColor darkGrayColor];
    anchorView.textColor = [UIColor blueColor];
} Infomation:@"💀👻🎅"];

Note:When add multi conditions,it will follow the order the the conditon is added,and find the first condition that match.

Author

leoMobileDeveloper, [email protected]

License

LHInfoTextfield is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "LHInfoTextfield",
    "version": "0.1.0",
    "summary": "A UITextfield Extension to show infomation when text match condition",
    "description": "A UITextfield Extension to show infomation when text match condition,it is quite easy to use",
    "homepage": "https://github.com/LeoMobileDeveloper/LHInfoTextfield",
    "license": "MIT",
    "authors": {
        "leoMobileDeveloper": "[email protected]"
    },
    "source": {
        "git": "https://github.com/LeoMobileDeveloper/LHInfoTextfield.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "LHInfoTextfield": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This