ios7 style picker & infint scrollview
Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CHPickerView
CHPickerViewDemo
preview.gif
readme.md add gif Dec 31, 2013

readme.md

This repositories contains two parts.

CHPickerView is ios7 style picker on ios5.
CHPickerElement is infint scrollview.

Both of them can support horizontal and vertical.

It's easy to use.

CHPickerElement *vv = [[CHPickerElement alloc] initWithFrame:CGRectMake(250, 50, 30, 130)];
vv.backgroundColor = [UIColor greenColor];
vv.sourceArray = @[@"0",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14",@"15"];
[self.view addSubview:vv];

or

CHPickerView *vv = [[CHPickerView alloc] initWithFrame:CGRectMake(10, 40, 150, 80)];
    vv.direction = CHPickerHorizontalDirection;
    vv.pickerLabelTextAlignment = NSTextAlignmentCenter;
    vv.maskBackgroundColor = [UIColor greenColor];
    vv.pickerBackgroundColor = [UIColor grayColor];
    vv.maskLabelFont = [UIFont systemFontOfSize:30];
    vv.maskLabelTextAlignment = NSTextAlignmentCenter;
    vv.maskAtIndex = 2;
    vv.pickerStartIndex = -2;
    vv.delegate = self;
    vv.currentPointOffset = CGPointMake(vv.contentHeight*2,0);
    vv.sourceArray = @[@"0",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14",@"15"];
    [self.view addSubview:vv];

you can see more in the demo.

more info: go to my blog