Answer the question
In order to leave comments, you need to log in
How to unlock user interface when scrolling a table?
Good afternoon, there is a date picker, it is in a table cell, if you scroll the table up and down, and then immediately try to twist the date picker, it will not work until the table stops its animation, is it possible to somehow make it so that did they spin together and not block user clicks while scrolling?
Answer the question
In order to leave comments, you need to log in
The problem (if it can be called a problem at all) is that it UITableView
doesn't skip events UIEvent
while scrolling its subviews. Therefore, yours UIDatePicker
does not receive any touches (events UIEvent
), until the table is stopped.
There may be several solutions here:
1) Redefine the method
func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView?
y UITableView
; Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question