Git Product home page Git Product logo

acfloatingtextfield's Introduction

ACFloatingTextField

Version License Platform

UITextfield class to float the Placeholder and customize the placeholder while editing.

Features

  • Add Floating effect In UITextfield Placeholder.
  • Change the Placeholder Text Color.
  • Change the Placeholder Text Color when UITextfield begins editing.
  • Add bottom line in .
  • Change the bottom line color.
  • Change the bottom line color when UITextfield begins editing.
  • The best is yet to come.

Installation

Installation with CocoaPods

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. which automates and simplifies the process of using 3rd-party libraries in your projects. See the Get Started section for more details. You can install it with the following command:

$ sudo gem install cocoapods

Podfile

To integrate ACFloatingTextfield into your Xcode project using CocoaPods, simply add the following line to your Podfile:

 pod “ACFloatingTextfield-Objc” , :git => 'https://github.com/ErAbhishekChandani/ACFloatingTextfield.git'
 

If you are using Swift, be sure to add use_frameworks! in your Podfile and set your target to iOS 8+:

platform :ios, '8.0'
use_frameworks!
pod “ACFloatingTextfield-Swift” , :git => 'https://github.com/ErAbhishekChandani/ACFloatingTextfield.git'

You can import ACFloatintextField in swift with @import ACFloatingTextfield_Swift .

Then, run the following command from Terminal:

$ pod install

You should open the {Project}.xcworkspace instead of the {Project}.xcodeproj after you installed anything from CocoaPods.

$ open *.xcworkspace 

Manual Installation

Download the Sample and drag & drop the ACFloatingTextField.h and ACFloatingTextField.m or if using swift drag ACFloatingTextfield.swift file in your project.

What's New

ACFloatingTextfield now works with swift 3.x .

How To Use.

1) Add Textfield From Storyboard in View Controller and Set the class to ACFloatingTextField or create the textfield programmatically.

2) Set the Delegate.

3) Set Placeholder Text By Following Method.

[(ACFloatingTextField *)textField setTextFieldPlaceholderText:@"Username"];

OR

acFloatingTextField.placeholder = @"";

4)Implement the UITextfield Delegate method.

-(BOOL)textFieldShouldReturn:(UITextField *)textField {

[textField resignFirstResponder];
return YES;

}

##Customization

1) Change the color of Bottom Line.

_textField.lineColor = [UIColor blueColor];

2) Change the selected State color for Bottom Line.

_textField.selectedLineColor = [UIColor orangeColor];

3) Change the Placeholder Color.

_textField.placeHolderTextColor = [UIColor redColor];

4) Change the Selected Placeholder Color.

_textField.selectedPlaceHolderTextColor = [UIColor greenColor];

5) Change lineColor, selectedLineColor , placeHolderColor & selectedPlaceHolderColor From Storyboard in Swift version.

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute,please submit a pull request.

License

ACFloatingTextField is released under the MIT license. See LICENSE for details.

acfloatingtextfield's People

Contributors

erabhishekchandani avatar keshavvishwkarma avatar mauker avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.