ios - Custom UITableViewController inside Container View -


i trying insert custom uitableviewcontroller inside container view. container view placed inside cell of static uitableview shown in figure below.

http://i.stack.imgur.com/a762b.png

i want method combine static dynamic cells in same screen.

in identity inspector when field class empty (i.e. standard uitableviewcontroller) works showing empty dynamic table inside cell. when put custom class name (that extends uitableviewcontroller) in field nsinternalinconsistencyexception:

[uitableviewcontroller loadview] loaded "enx-at-rum-view-zy2-9u-z6d" nib didn't uitableview. 

these contents of mycustomuitableviewcontroller:

@implementation mycustomuitableviewcontroller  - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil {     self = [super initwithnibname:nibnameornil bundle:nibbundleornil];     if (self) {         // custom initialization     }     return self; }  - (void)viewdidload {     [super viewdidload];      // uncomment following line preserve selection between presentations.     // self.clearsselectiononviewwillappear = no;      // uncomment following line display edit button in navigation bar view controller.     // self.navigationitem.rightbarbuttonitem = self.editbuttonitem; }  - (void)didreceivememorywarning {     [super didreceivememorywarning];     // dispose of resources can recreated. }  #pragma mark - table view data source  - (nsinteger)numberofsectionsintableview:(uitableview *)tableview {     // return number of sections.     return 1; }  - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section {     return 2; } @end 

i have admit still don't understand logic behind container view, want show 1 view inside (not doing swapping or else).

any appreciated, thanks!

let me point out issues here first-

problem 1: can not have controller inside controller. means, inside static tableview, can not have dynamic tableview controller.

solution 1:you can have dynamic tableview.

problem 2: can not have static tableview inside view controller. if want static tableview need have uitableviewcontroller rather uiviewcontroller.

solution 2: need delete viewcontroller have , replace uitableviewcontroller.

now achieve 1 controller can have dynamic tableview inside static tableview, need implement dynamic table's datasource inside static table's viewcontroller bad practise. static table should not need know dynamic table, @ least data populated in dynamic table. however, if want dynamic tableview inside static tableview static tableview's controller needs implement uitableviewdatasource.

enter image description here so, may want re-think structure.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -