Hear is just the idea what i am thinking to implement this,
I want to implement book like pages, for this i want to take UITableView and rotated-90 degree and its cell by 90 degree, and now i want to subclass UITableViewCell, now within this tableview cell it is possible to add UITableview so that user can scroll vertically to see the contents and user can also scroll horizontally to go to next cell of rotated tableview. It is just i am thinking, is there any better way to implement this.
Although rob's Idea is better but yes it is possible. Check how:
Take 2 table view, give them tag 1, 2, let's call these kTagBaseTableView, kTagInnerTableView. Now below is the blue print, how to deat with two table view, with delegate and data source attached to single view controller.
yes it is possible, I added the UITableVIew within the UITableView cell .. :)
no need to add tableview cell in xib file - just subclass the UITableviewCell and use the code below, a cell will be created programatically.
Swift version Create a
single view project
addtableview
insidestoryboard
and set up itsdatasource
anddelegate
Paste code below to
ViewController.swift
create a new file
CustomCell.swift
which is the subclass ofUITableViewCell
anddo not select with xib
this file is without.xib
filetable
and itscell
will be created programatically as inobjective-c code
.Paste code below to
CustomCell.swift
Create a subclass for tableView and override the intrinsicContentSize. I have answered here.
Better way: use a
UIPageViewController
for your left/right page scrolling. Each page can contain a table view.