I want to have two table views sitting horizontally next to each other. I am able to set up a UIPageControl
along with a UIScrollView
to page between two images, but how do I set up two UITableView
s next to each other within a UIScrollView
who's width is of screenWidth*2
to page between the table views?
The tricky part is, once I get this to work, I need to be able to put the resulting construct itself into a UITableViewCell
because the whole thing is also part of a bigger encompassing table view.
Would I create two different UITableViewController
classes that each load their respective data, and then dynamically load those into UIView
s of screenWidth
width in the UIScrollView
? I'm really lost here as to how to go about this.
Create a
UIPageViewController
. Create your 2UITableViewController's
and set them as- setViewControllers:direction:animated:completion:
. This will automatically handle the swipe between them. You wouldn't need to add them to aUIScrollView
.