Closed DechengMa closed 4 years ago
Can you please add more picker example style for iOS 14 (
.wheels
)? Other than that, can you also put a guard so if the device is running iOS lower than 14, the inline picker is hidden?
Hi @nabby26 I've added the wheel example, and make all these changes available on iOS 14 only (will fallback when is 13 or below). Please take a look when free, thanks
I am not a really a fan of switching between
normalContainer
andiOS14Container
just to hide and show new pickers. But, I completely understand why you need to do this. It's the consequence of using view controller instead of table view controller, and auto layout too. Definitely, it will be much nicer if this was TableViewController instead, and you can dynamically add or remove pickers.I will refactor this view controller to be table view controller by next week. But so far, this is good to merge 🚢
True, the old codebase uses storyboard to a very large extent, all the constraints are pointing each other so It's very hard to hide some views. Thanks for the review, will merge this now.
This PR is to add a new date picker with style
.inline
to picker controllerChanges
.preferredDatePickerStyle = .inline
Notes
Demo