Skip to content

billburgess/BBTextFieldPicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBTextFieldPicker

BBTextFieldPicker is a UITextField replacement that swaps out the keyboard for a UIPickerView.

BBTextFieldPicker

Installation via CocoaPods

Add pod 'BBTextFieldPicker' to your Podfile

Manual Installation

Copy the BBTextFieldPicker.h/m files to your project.

Usage

Just use BBTextFieldPicker as a replacement for UITextField.

BBTextFieldPicker *textField = [[BBTextFieldPicker alloc] init];
textField.placeholder = @"Placeholder text";
textField.pickerDataSource = someArray;
textField.toolbarButton.title = @"Next";
textField.textFieldPickerDelegate = self;

You can also swap out the class type in Interface Builder if you want. Just add a normal UITextField and change the class type to BBTextFieldPicker.

BBTextFieldPicker Delegate Method

- (void)pickerToolbarButtonPressed:(id)sender;

The toolbar button can be used to navigate to the next text field (if used in a form) or to just dismiss the picker. Implementation is up to the user.

About

A UIPickerView replacement for the keyboard in a UITextField

Resources

License

Stars

Watchers

Forks

Packages

No packages published