skywinder / ActionSheetPicker-3.0

Quickly reproduce the dropdown UIPickerView / ActionSheet functionality on iOS.
http://skywinder.github.io/ActionSheetPicker-3.0
BSD 3-Clause "New" or "Revised" License
3.4k stars 740 forks source link

ios 14 issue display picker only one date ? #524

Open maulikshah09 opened 3 years ago

maulikshah09 commented 3 years ago

Simulator Screen Shot - iPhone 8 - 2020-11-22 at 00 02 44

noorulain17 commented 3 years ago

@maulikshah09 You need to change the picker style for the library

maulikshah09 commented 3 years ago

how can i select date here??

maulikshah09 commented 3 years ago

can you help me to sort out this ... my app is mostly used your third party app..currently i am stuck and client also frustrated how can i change picker older way or another approach to view good picker UI

sourabh31 commented 3 years ago

@maulikshah09 you need to update some code

in class "ActionSheetDatePicker.m" --> function "- (UIView *)configuredPickerView"

add below line of code, after that its work fine

[datePicker setPreferredDatePickerStyle:UIDatePickerStyleWheels];

maulikshah09 commented 3 years ago

yes it's work fine but right side space is display.

noorulain17 commented 3 years ago

yes it's work fine but right side space is display.

  1. Which version of the library are you using?
  2. You can change the datePickerStyle using this code.

Let me know if this helps.

glennposadas commented 3 years ago

just set your datePickerStyle to UIDatePickerStyleWheels.

Example:

  ActionSheetDatePicker *actionSheetPicker = [[ActionSheetDatePicker alloc] initWithTitle:title datePickerMode:UIDatePickerModeDate selectedDate:dateValue target:self action:@selector(dateWasSelected:element:) origin:self];
  if (@available(iOS 13.4, *)) {
    actionSheetPicker.datePickerStyle = UIDatePickerStyleWheels;
  }
  [actionSheetPicker showActionSheetPicker];

No need to modify the library.

maulikshah09 commented 3 years ago

Check on iphone 11 pro. space is display @glennposadas

noorulain17 commented 3 years ago

@maulikshah09 can you please share the screenshot with the space?

glennposadas commented 3 years ago
Screen Shot 2021-01-04 at 5 53 37 PM

@noorulain17 Hello. Here it is.

noorulain17 commented 3 years ago

@glennposadas this issue has been fixed in this commit in PR #511 by @palmtrae.

Please update your library to the latest version and share your findings again :)

glennposadas commented 3 years ago

Super cool! thank you so much!

On Wed, Jan 6, 2021 at 4:08 PM Noor ul Ain Ali notifications@github.com wrote:

@glennposadas https://github.com/glennposadas this issue has been fixed in this commit https://github.com/skywinder/ActionSheetPicker-3.0/commit/e279354b10eb5ccd4847a211866346c971ac1919 in PR #511 https://github.com/skywinder/ActionSheetPicker-3.0/pull/511 by @palmtrae https://github.com/palmtrae.

Please update your library to the latest version and share your findings again :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/skywinder/ActionSheetPicker-3.0/issues/524#issuecomment-755150722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7MNF6DRYY7SX2DZEDNTSDSYQLA5ANCNFSM4T56H65Q .

-- Best Regards, Glenn Posadas

glennposadas commented 3 years ago

On a second thought, @noorulain17 what we wanted to raise is the picker not being centered.