This project is no longer being actively maintained.
FieldKit is a UI library of custom text fields for iOS:
- FKTextField is similar to UITextField
- FKTokenField is similar to NSTokenField in AppKit but adapted to iOS/Touch Interaction
- FKScrollField adds multiple lines and scrolling to FKTextField
How to use FieldKit in your project
- Create or edit an existing text file named Podfile in your Xcode project directory:
platform :ios, '5.1'
pod "FieldKit", '~> 0.1.4'
- Install FieldKit in your project:
$ pod install
- Open the Xcode workspace instead of the project file when building your project:
$ open YourProject.xcworkspace
- Use FieldKit in your project:
- Open FieldKit.xcodeproj
- Select the 'Framework' scheme
- Build (this will build two products, 'FieldKit.framework' and 'FieldKit.bundle')
- Import the FieldKit.framework to your project
- Add '-ObjC' to Other Linker Flag in Build Settings target section (in order to load Objective-C class categories)
- Add FieldKit.framework to Link Binary with Libraries in Build Phases target section
- Add FiekdKit.bundle to your project resources
You also need to add the following frameworks to your project:
FieldKit doesn't subclass the text fields provided by UIKit. The text input, selection and manipulation is implemented from scratch. It conforms to UITextInput like UITextField.
- Prefix label (optional)
- Placeholder (optional)
- Single line
- Token view cells (UIControl)
- Object <-> token representation
- Possible applications: Could be used to pick values from predefined list (ie. address book, tags, keywords, email adresses, ...)
- Multiple lines
- Ability to expand frame beyond initial frame
- Delegate is notified about changes and can control growing behaviour
- Will enable scrolling if content doesn't fit frame
The Overview example shows how to use FKTextField and FKTokenField. The text field are presented inside a scroll view.
A FKTokenField example, using UIColor instances as represented objects. The provided TokenFieldCell is subclassed. The background color and display string are derived from the UIColor.
A composer view similar to the iOS Mail application. (work in progress)
- Full iPad support (not tested)
- ARC support
- iOS 7 UI