0

According to this question and one of the answers referring to this apple documentation embedding a UITableView in a UIScroll view isn't a very reliable option, however I am looking for a specific type of functionality in that I have a table list of data to my left and a menu to my right (digram below). I would like to be able to scroll to my menu while leaving an edge of the table data for view (somewhat like the "peeking" section of this tuorial)

I am able to do this using the tutorial listed above and nesting a subview:

let page = self.storyboard!.instantiateViewControllerWithIdentifier("TableData") as! UIViewController
scrollView.addSubview(page.view)

However, and as expected by the warnings from apple, this causes some pretty undesirable behavior when I attempt to scroll the table. So, my question is, how else would I implement this type of menu/list?

enter image description here

Community
  • 1
  • 1
Howard Zoopaloopa
  • 3,798
  • 14
  • 48
  • 87

1 Answers1

0

Can you try giving your UITableView a constant NSLayoutConstraint for it's height?

So pin the tableView to the top, trailing, and leading edges of the UIScrollView.

Then give it a constant height (height of cell * number of cells)

aahrens
  • 5,522
  • 7
  • 39
  • 63