Latest 1.0.0
Homepage https://github.com/samvoigt/SRVPickerButton
License MIT
Platforms ios 5.0, requires ARC
Authors

A UIButton that can become first responder and present a picker

Usage:

(see sample Xcode project in /SRVPickerButtonDemo)

SRVPickerButtons can be used in IB or in code, and can be subclassed. Each button must have a delegate that subscribes to the SRVPickerButttonDelegate protocol, and implements the following methods:

- (NSInteger)numberOfRowsInPickerButton:(SRVPickerButton *)pickerButton;
- (NSString *)pickerButton:(SRVPickerButton *)pickerButton titleForRow:(NSInteger)row;
- (void)pickerButton:(SRVPickerButton *)pickerButton didSelectRow:(NSInteger)row;

Additionally, there are the following optional delegate methods:

- (void)pickerButtonDidCancel:(SRVPickerButton *)pickerButton;
- (void)pickerButton:(SRVPickerButton *)pickerButton scrolledToRow:(NSInteger)row;

These are all similar to UIPickerButton Datasource/Delegate methods, with the exception being that the UIPickerDelegate didSelectRow corresponds to the SRVPickerButton didScrollToRow.

Latest podspec

{
    "name": "SRVPickerButton",
    "version": "1.0.0",
    "summary": "A UIButton that presents a picker view for input.",
    "description": "SRVPickerButton allows you to have buttons that present a picker for input, similar to a drop down field on a website.",
    "homepage": "https://github.com/samvoigt/SRVPickerButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Sam Voigt": "[email protected]"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/samvoigt/SRVPickerButton.git",
        "tag": "1.0.0"
    },
    "source_files": "SRVPickerButton/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This