Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes it is. But you have to invest some work to have this build up cleanly.</p> <p>First I would suggest to build a Controller object which has two UITableViewController objects as properties.</p> <p>These will manage the table views.</p> <p>You can assign a datasource and a delegate to each of the table view controllers.</p> <p>@interface TableViewManager : NSObject { UITableViewController *myTableViewController1; UITableViewController *myTableViewController2; }</p> <p>@property(nonatomic, retain) UITableViewController *myTableViewController1; @property(nonatomic, retain) UITableViewController *myTableViewController2;</p> <p>// These will be implemented manually to delegate to the corresponding TableVC @property (nonatomic, assign) id myTableViewDelegate1; @property (nonatomic, assign) id myTableViewDelegate2; @property (nonatomic, assign) id myTableViewDataSource1; @property (nonatomic, assign) id myTableViewDataSource2;</p> <p>@end</p> <p>@implementation</p> <p>@synthesize myTableViewController1, myTableViewController2;</p> <ul> <li><p>(id) init { if ( (self = [super init]) ) { // actually you can take these lines to a nib by defining a UITableViewController like object. self.myTableViewController1 = [UITableViewController alloc] initWithStyle:ITableViewStylePlain]; self.myTableViewController1 = [UITableViewController alloc] initWithStyle:ITableViewStylePlain]; }</p> <p>return self; }</p></li> </ul> <p>// Example for 1 setter, the rest of the assign-properties will be similar - (void) setMyTableViewDelegate1:(id)aDelegate { self.myTableViewController1.delegate = aDelegate; }</p> <ul> <li><p>(void) dealloc { self.myTableViewDelegate1 = nil; self.myTableViewDelegate2 = nil; self.myTableViewDataSource1 = nil; self.myTableViewDataSource2 = nil;</p> <p>self.myTableViewController1 = nil; self.myTableViewController2 = nil; </p> <p>[super dealloc]; }</p></li> </ul> <p>@end</p> <p>After that class has been initialized you can assign the tableViews from each table view controller to your UIView by applying the addSubview: message.</p> <p>You have the benefit of a clean structure and no problems with bloated classes.</p> <p>If you want and/or need it you may define your own custom class of UITableViewController and modify it to your needs, for example that it uses a custom derivative of UITableView.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload