UIFloatLabelTextField

A subclassed UITextField that follows the Float Label UI design pattern.

Github星跟蹤圖

UIFloatLabelTextField

A subclassed UITextField that implements the Float Label UI design pattern.

Cocoapods Carthage Compatible


Note

If you are looking for the UITextView equivalent of this class, please visit my UIFloatLabelTextView repository.

About

In 2013, Matt D. Smith unveiled the Float Label user interface design pattern. In short, it retains a text field's placeholder above said text field as a floating label. This label is brightly colored when the field is active, and dimly colored when a user has finished editing that field.

Sample Gif of Library in Action

Features

  • Works with all view init styles
    • Visual Formatting Language (for programmatic NSAutoLayout)
    • Manual Frame Initialization
    • Storyboards and Xibs
  • Works with all NSTextAlignments
  • Support for disabling all default UIMenuController options
    • E.g., Paste, Copy, Cut, Select, Select All
  • Animations
    • Animation when toggling UILabel visibility
    • Animation when clearing text

Installation

CococaPods

pod 'UIFloatLabelTextField'

Carthage

github "ArtSabintsev/UIFloatLabelTextField"

Setup

Check out UIFloatLabelTextField.h for a full list of editable properties. Also, check out the UIFloatLabelSampleApp for an example implementation of the application.

Credit

I want to credit Jared Verdi for developing the first iOS implementation of this pattern in his JVFloatLabeledTextField project. I used it as a reference to make this version, but executed most aspects differently. I also added many other features that I personally needed, and plan on continuing to enhance this library over time.

Created and maintained by

Arthur Ariel Sabintsev

License

Please refer to the LICENSE file.

主要指標

概覽
名稱與所有者ArtSabintsev/UIFloatLabelTextField
主編程語言Objective-C
編程語言Objective-C (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2014-03-14 05:21:57
推送於2019-03-08 13:10:10
最后一次提交2019-03-08 08:10:09
發布數28
最新版本名稱1.2.9 (發布於 )
第一版名稱1.0.0 (發布於 )
用户参与
星數321
關注者數11
派生數39
提交數84
已啟用問題?
問題數0
打開的問題數0
拉請求數6
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?