The biggest problem with iOS comes with Uidatapicker and Uidatepicker is that they don't have both the OK and Cancel buttons, and Actionsheetpicker is the open source package for the above two selectors. But this east also has some small problem, is the content that does not have the Chinese to choose the device.
The original Actionsheetpicker run like this:
After the improvement, this looks like this.
Click here to download, there is a problem can be deducted 359709421 discussion.
To supplement a bug fix, in iOS7 and above, the selector data part is transparent, very unattractive,
Add a line to the Showactionsheetpicker method of ABSTRACTACTIONSHEETPICKER.M
Masterview.backgroundcolor=[uicolor Whitecolor];
The problem can be resolved.
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 shop, please have a visit to visit http://mrs-x.taobao.com/
- Timcinel-actionsheetpicker-4d01f72.zip
iOS custom selector Actionsheetpicker improved