iphone - Load nib / xib / view by clicking in the cell of tableview -
how open nib / xib / view while selecting row tableview... below code
public class tableviewdelegate : uitableviewdelegate { private list list; public tableviewdelegate(list<string> list) { this.list = list; } public override void rowselected (uitableview tableview, nsindexpath indexpath) { console.writeline("tableviewdelegate.rowselected: label={0}",list[indexpath.row]); } }
just add together new view controller subview.
- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { newviewcontroller *myviewcontroller = [[newviewcontroller alloc] initwithnibname:@"newviewcontroller" bundle:nil]; [self.view addsubview:myviewcontroller]; }
iphone ios objective-c monotouch
No comments:
Post a Comment