Latest 1.5.2
License MIT
Platforms ios 7.0, requires ARC


A custom view component that gives the user the ability to stack picker views.

TWRPickerSlider Demo


Add the dependency to your Podfile:

platform :bios
pod 'TWRPickerSlider’, ‘~> 1.0’

Run pod install to install the dependencies.

Next, import the header file wherever you want to use the picker:

#import "TWRSliderStackedView.h"
#import "TWRPickerSlider.h"

You should first initialize your TWRPickerSlider as such:

TWRPickerSlider *slider1 = [[TWRPickerSlider alloc] init];

…and assign some objects for the picker:

slider1.pickerObjects = @[obj1, obj2, obj3];

Objects passed to the picker can be of any type, provided they conform to the TWRPickerSliderDatasource protocol. Said protocol only requires the user to implement the following method, which returns the string that the picker will display for the object:

- (NSString *)twr_pickerTitle;

Then set the picker delegate to be your view controller and implement the TWRPickerSliderDelegate protocol:

// Set Delegate
slider1.delegate = self;

// TWRPickerSliderDelegate
- (void)objectSelected:(id<TWRPickerSliderDatasource>)selectedObject sender:(TWRPickerSlider *)sender{
    NSLog(@"Selected object: %@", [selectedObject twr_pickerTitle]);

Finally add you TWRPickerSlider instance to your view. It will automatically position itself at the bottom of the view and animate / slide when pressed.

Stacking pickers

Alternatively, if you have or want to display more than one picker at a time, you can instantiate a TWRSliderStackedView object and assign it an array of TWRPickerSlider.

TWRSliderStackedView *stack = [[TWRSliderStackedView alloc] init];
stack.sliders = @[slider1, slider2, slider3];
[self.view addSubview:stack];

Again, the stacked view will position itself at the bottom of the current view. If you’re working inside a tab bar controller, or if you don’t want the stacked view to stick at the bottom of the view controller, you can use one of the following two methods:

- (instancetype)initWithBottomPadding:(NSUInteger)padding;
- (instancetype)initWithTabBar;

See the demo project for more details.


TWRPickerSlider requires iOS 7.x or greater.


Usage is provided under the MIT License. See LICENSE for the full details.

Latest podspec

    "name": "TWRPickerSlider",
    "version": "1.5.2",
    "summary": "A stack of sliding cards with pickers",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Michelangelo Chasseur": "[email protected]"
    "social_media_url": "",
    "source": {
        "git": "",
        "tag": "1.5.2"
    "platforms": {
        "ios": "7.0"
    "source_files": "Pod/*.{h,m}",
    "resources": [
    "requires_arc": true

Pin It on Pinterest

Share This