I selected project as WindowsBased application from Xcode. I have to views in first views i have only button and in second views i have to show values in TableNavigation. I create my first view with simple WindowBased application selection. From the first screen i am able to load my second screen. I am loading secondScreen.xib file on button click event. This is loading successfully. In secondScreen.xib file i have table view. When application is runnig this is showing blank. I have to to set some values in Row and Column. How will i do this ? I have written a function code but i don’t know how will i load this function when secondScreen is loading. I was selected New File –> UIViewController SubClass for secondScreen.
-(void) fillList {
NSArray *tempArr=[[[NSArray alloc] initWithObjects:@"A",@"B",@"C",nil]autorelease];
self.tableList=tempArr;
}
My interface structure is like here.
@interface MyViewController : UITableViewController {
NSArray *tableList;
}
@property (nonatomic,retain) NSArray *tableList;
-(void) fillList;
@end
Check this tutorial.
In order to display a
UITableView, you need to setup a data source and, possibly, a delegate. The data source is responsible to provide your table with the rows it should display. Read the tutorial to understand how the data source can be defined step by step.