Tableview will prevent the button from viewing the view above it.

I have a tableView in my view when the user clicks on a specific cell. I am showing a view that has a date picker, it partially closes the tableView.

The problem I ran into is that the tableView captures a click on the button that closes the view containing the date picker. I tried resizing the View table to test this theory, it works fine, then the tableView is not under the button.

Does anyone know how I can prioritize button touches over a tableView?

I tried to bring the view forward: self.view.bringSubviewToFront(self.datePickerView)

And the views are in the correct order in the storyboard:

enter image description here

+4
2

userInteractionEnabled . , . (, ).

0

, UIView UITableView - . enter image description here

, :

self.view.bringSubviewToFront(pickerParentView)
0

Source: https://habr.com/ru/post/1609948/


All Articles