Latest 0.1.4
Homepage https://github.com/juanjoguevara/JJMaterialTextField
License MIT
Platforms ios 7.0, requires ARC
Authors

A subclass of UITextfield based on Material Design in Objective C

Version
License
Platform

screenshot
Show Appetize.io DEMO

Example project

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

Requirements

  • ARC
  • iOS 7

Installation

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

pod "JJMaterialTextField"

Usage

Import


#import "JJMaterialTextField.h"

Initialize textfield and configure


JJMaterialTextfield *textField =[[JJMaterialTextfield alloc] initWithFrame:CGRectMake(40, 120, self.view.frame.size.width-80, 34)];
textField.textColor=[UIColor whiteColor];
textField.enableMaterialPlaceHolder:YES;
textField.errorColor=[UIColor colorWithRed:0.910 green:0.329 blue:0.271 alpha:1.000]; // FLAT RED COLOR
textField.lineColor=[UIColor colorWithRed:0.482 green:0.800 blue:1.000 alpha:1.000];
textField.tintColor=[UIColor colorWithRed:0.482 green:0.800 blue:1.000 alpha:1.000];
[email protected]"Username";
[self.view addSubview:textField];

Use placeholder Attributes


  textField.placeholderAttributes = @{NSFontAttributeName : [UIFont systemFontOfSize:20],
                                            NSForegroundColorAttributeName : [[UIColor grayColor] colorWithAlphaComponent:.8]};

Author

Juanjo Guevara, [email protected]

License

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

Latest podspec

{
    "name": "JJMaterialTextField",
    "version": "0.1.4",
    "summary": "A Subclass of UITextfield based on Material Design",
    "description": "This CocoaPod provides a UITextfield with Material Design appearance",
    "homepage": "https://github.com/juanjoguevara/JJMaterialTextField",
    "license": "MIT",
    "authors": {
        "Juanjo Guevara": "[email protected]"
    },
    "source": {
        "git": "https://github.com/juanjoguevara/JJMaterialTextField.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "JJMaterialTextField": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This