APLTextField 0.0.2

APLTextField 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Michael Kamphausen, cg, Tino Rachui, Mathias Köhnke, Mathias Koehnke, Nico Schümann, Heiko Wichmann, Stephan Lerner, Famara Kassama.



  • By
  • Michael Kamphausen and Nico Schümann

Advanced UITextField subclass with the possibility to be connected to a picker. Text Field can be configured with a list of options which will be presented in a picker view instead of showing a keyboard.

Supports:

  • UIDatePicker and UIPickerView
  • text field clearance with "select none" option
  • preselection
  • left image icon

Installation

Usage

Import header file:

#import "APLTextField.h"

Standard Picker

Initialize your APLTextField Intance as text field with UIPickerView as inputView:

yourTextField.pickerOptions = @[@"A", @"B", @"C"];

To set the value of the text field, don't use yourTextField.text but:

[yourTextField setAndSelectText:@"C"];

Date Picker

Initialize your APLTextField Intance as text field with UIDatePicker as inputView:

dateTextField.hasDatePicker = YES;

To set the value, don't use dateTextField.text but:

[dateTextField setAndSelectDate:[NSDate date]];

Get the date by calling:

NSDate* date = [dateTextField getDate];