Giter Club home page Giter Club logo

b68floatinglabeltextfield's Introduction

B68FloatingLabelTextField

Swift implementation of the Float Label Design Pattern by Matt D. Smith as a sub call from UITextField

Implementing an input field for a device with limited screen estate is challenging. Matt has developed an pattern for combining a placeholder text wit a floating label if needed.

Floating Label Animation Example

I implemented the pattern in SWIFT and enabled some of the internal propertiers in Xcode 6 Interface Builder (see screenshot)

Screenshot

####Exposed Properties

  • Active Color: Text color of the floating label if focused
  • Inactive Color: Text Color of the floating label if unfocused

Installation

Manual

Just clone and add B68UIFloatLabelTextField.swift to your project.

CocoaPods

  • Make sure that your CocoaPods version is >= 0.36: pod --version
  • If not, update it: sudo gem install cocoapods
  • pod init in you project root dir
  • nano Podfile, add:
pod 'B68UIFloatLabelTextField', '~> 0.1.0'
use_frameworks! 
  • Save it: ctrl-x, y, enter
  • pod update
  • Open generated .xcworkspace

####Requirements

  • iOS 7.0+ (8.0+ if you use CocoaPods)
  • Xcode 6.3
  • Swift 1.2

####License MIT

Based on the Objectiv-C implementations from:

b68floatinglabeltextfield's People

Contributors

dirkfabisch avatar jaisonv avatar johndpope avatar onra avatar readmecritic avatar

Watchers

 avatar  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.