Skip to content
Andrei Popescu edited this page Aug 2, 2024 · 1 revision

Picker initialization

@property (strong, nonatomic) UIAPPicker *apPicker;

- (UIAPPicker *)apPicker
{
    if (!_apPicker) {
        _apPicker = [UIAPPicker pickerForView:self.view delegate:self];
    }
    return _apPicker;
}

Show Picker

[self.apPicker show:@[@"Moscow", @"New York",  @"Paris", @"Berlin", @"Ankara"] withSelectedRow:0];

UIAPPickerDelegate

@protocol UIAPPickerDelegate
- (void)pickerDidCancel:(UIAPPicker *)anPicker;
- (void)picker:(UIAPPicker *)anPicker didSelectItem:(id)anItem;
@end

Clone this wiki locally