Skip to content

Janak-Nirmal/AKPickerView

 
 

Repository files navigation

AKPickerView

image

A simple but customizable horizontal picker view.

Works on iOS 6/7.

Usage

Instantiate and set delegate as you know,

self.pickerView = [[AKPickerView alloc] initWithFrame:<#frame#>];
self.pickerView.delegate = self;

and specify items using delegate methods.

- (NSUInteger)numberOfItemsInPickerView:(AKPickerView *)pickerView;
- (NSString *)pickerView:(AKPickerView *)pickerView titleForItem:(NSInteger)item;

You can change appearances below.

@property (nonatomic, strong) UIFont *font;
@property (nonatomic, strong) UIColor *textColor;
@property (nonatomic, strong) UIColor *highlightedTextColor;
@property (nonatomic, assign) CGFloat interitemSpacing;

After all settings, never forget to reload your picker.

[self.pickerView reloadData];

For more detail, see the sample project.

About

A simple but customizable horizontal picker view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published