I have a problem with a UITableView not detecting touches.
In an iPhone-only app, I have a UIViewController, which containts:
- UIScrollView
- UIView (let's say a content view)
- Some labels
- UITableView (last)
- UIView (let's say a content view)
The labels have a dynamic height, because they contain some text that I must retrive from the web, so I'm using auto layout.
I'm setting the content size of the UIScrollView inside the viewDidLayoutSubviews
method, and I'm doing this by summing UITableView.frame.origin.y
and its height.
Here comes the problem: when the labels contain only some words and the UITableView does not exceed the iPhone screen size, everything works ok. But when they grow, and the UITableView gets pushed down, when I scroll down I can't click on the cell anymore. Also, if when loading the view the table is half visible and half not, I can click the visible cells, but if I scroll down, I can't click the others.
I'm using swift 2 and Xcode 7.
Here is an example:
Clickable:
Unclickable:
AutoLayout
? – Sohil R. Memon