Latest 0.0.2
Homepage https://github.com/duffpod/DFPickerView
License MIT
Platforms ios 7.0, requires ARC
Authors

Version
Platform

Usage

__block NSMutableArray *array = [NSMutableArray array];

@autoreleasepool {

    for(int i = 1;i < 100;i++) {

        [array addObject:[NSNumber numberWithInteger:i]];

    }

}

self.pickerView = [[DFPickerView alloc] initWithStyle:DFPickerViewStyleDark]; // DFPickerViewStyleLight
self.pickerView.animationDuration = 0.30f; // defaults to 0.23f
[self.view addSubview:self.pickerView];

[self.pickerView showInView:self.view withAnimations:nil completion:nil objects:array converter:^NSString *(id object) {

    return [[object stringValue] stringByAppendingString:@" pcs."];

} selection:^(NSInteger selectedIndex, id selectedObject) {

    NSLog(@"Selecting object: %@ at index: %i", selectedObject, selectedIndex);

} cancel:^{

    array = nil;
    self.pickerView = nil;

    NSLog(@"Cancelled");

} done:^(NSInteger selectedIndex, id selectedObject) {

    array = nil;
    self.pickerView = nil;

    NSLog(@"Completed with object: %@ at index: %i", selectedObject, selectedIndex);

}];

Requirements

iOS 7 and later.

Installation

DFPickerView is available through CocoaPods, to install
it simply add the following line to your Podfile:

pod "DFPickerView"

Author

duffpod, [email protected]

License

DFPickerView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DFPickerView",
    "version": "0.0.2",
    "summary": "A simple picker view with tool bar and blocks.",
    "homepage": "https://github.com/duffpod/DFPickerView",
    "license": "MIT",
    "authors": {
        "duffpod": "[email protected]"
    },
    "source": {
        "git": "https://github.com/duffpod/DFPickerView.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "ios": {
        "exclude_files": "Classes/osx"
    },
    "osx": {
        "exclude_files": "Classes/ios"
    }
}

Pin It on Pinterest

Share This