xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.78k stars 1.33k forks source link

Time View in DateTimeInlineRow covered by keyboard while editing #2088

Open funkenstrahlen opened 4 years ago

funkenstrahlen commented 4 years ago

I use DateInlineRow in a form. On iOS 14 the new date picker style is used. When I tap into the time selection field the keyboard opens and covers the time field. This is unfortunate as the user can not see what time he is entering.

IMG_2985 IMG_2986

Eureka 5.3.1 Xcode 12.0.1 iOS 14.0.1

mats-claassen commented 4 years ago

We could reproduce this issue. However, I am not sure if datePicker tells you when its time field becomes first responder. It also seems the native iOS apps mostly use Date and Time rows separately. Or did you find any native app which uses a datetime picker?

aliawais-cm commented 3 years ago

Fixed this issue by adding following observer: datePicker.addTarget(self, action: #selector(dateDidBeginEditing), for: .editingDidBegin)

Date picker is in cells so it informs VC and VC set the tableView contentInset based on keyboard and scroll the cell with date picker to top. (scrollRectToVisible or scrollToRow)