Ios custom selector ActionSheetPicker available version, iospicker
The biggest problem with UIDataPicker and UIDatePicker in ios is that there are no buttons for confirmation and cancellation, while ActionSheetPicker is an open-source encapsulation of the preceding two selectors. However, there is also a small problem with this stuff, that is, there is no Chinese selector content.
The original ActionSheetPicker runs like this:
This is what it looks like after improvement
Click here to download. If you have any questions, you can deduct 359709421 for discussion.
Add a defect fix. In ios7 and later versions, the selector data is transparent and not beautiful,
Add a line to the showActionSheetPicker method of AbstractActionSheetPicker. m.
MasterView. backgroundColor = [UIColor whiteColor];
This problem can be solved.
Java code
-(Void) showActionSheetPicker {
UIView * masterView = [[UIView alloc] initWithFrame: CGRectMake (0, 0, self. viewSize. width, 260)];
UIToolbar * pickerToolbar = [self createPickerToolbarWithTitle: self. title];
[PickerToolbar setBarStyle: UIBarStyleBlackTranslucent];
[MasterView addSubview: pickerToolbar];
Self. pickerView = [self configuredPickerView];
NSAssert (_ pickerView! = NULL, @ "Picker view failed to instantiate, perhaps you have invalid component data .");
[MasterView addSubview: _ pickerView];
MasterView. backgroundColor = [UIColor whiteColor];
[Self presentPickerForView: masterView];
}
- (void)showActionSheetPicker { UIView *masterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.viewSize.width, 260)]; UIToolbar *pickerToolbar = [self createPickerToolbarWithTitle:self.title]; [pickerToolbar setBarStyle:UIBarStyleBlackTranslucent]; [masterView addSubview:pickerToolbar]; self.pickerView = [self configuredPickerView]; NSAssert(_pickerView != NULL, @"Picker view failed to instantiate, perhaps you have invalid component data."); [masterView addSubview:_pickerView]; masterView.backgroundColor=[UIColor whiteColor]; [self presentPickerForView:masterView];}
My online shop, please visit http://mrs-x.taobao.com/
- TimCinel-ActionSheetPicker-4d01f72.zip