when I swipe form left to right, the controller is being shown from
right
Disclaimer: I usually am in Cocoa so not all here may work.
The tableView is in focus, so is also first responder and so the UIScrollView in which the TableView is embedded eats your swipes and scrolls instead. One option if you don‘t need vertical scrolling either is to remove the scrolling part by modifying the view hierarchy or by using a custom scrollView class which pipes all the scrollWheel events to nextResponder. You could also implement a custom UIScrollView and set the custom class as the one used in your scrollView. The class would maybe split every scroll event up into vertical and horizontal event, whereby the vertical go to super.scrollWheel(with:)
and the horizontals go to nextResponder.scrollWheel(with:)
. Another shot in the dark would be to set the view inside the scrollView fixed to the scrollViews‘ leading and trailing anchor so it cannot change size, dunno whether that still eats vertical scroll wheels though, so probably won‘t work.
I tried pushing the viewController by clicking one of the cells, but
the screen freezes
Freezes can have lots of reasons. Maybe deadlock, maybe sth else. Do you receive the action event? If so please try to find where it freezes with breakpoints and show some code. or are you using segues? Not enough info.
5
solved Unable to pushViewController with animation [closed]