I am very new to Iphone development. so please take me if I ask very simple questions.
In my application, I have several types (for example, .xib files). When I click a button on the main screen (CouponWebsiteViewController.Xib), the application should load the second view (BrowseList.Xib) that contains UITable, and I have to fill this UITable with some data. I wrote the following code to populate the data in the BrowseList.m file:
- (void) viewDidLoad{ arrayData = [[NSArray alloc] init]; arrayData = [arrayData arrayByAddingObject:@"dfsgdf"]; arrayData = [arrayData arrayByAddingObject:@"aaaaaa"]; self.lblNewScreen.text = [arrayData objectAtIndex:0]; [super viewDidLoad]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; }
But it does not fill in the data in the table, when I debug this code, I found that it does not execute the cellForRowAtIndexPath method, but it debugs the numberOfRowsInSection and numberOfSectionsInTableView methods.
But interestingly, when I write the same code on CouponWebsiteViewController.m (i.e. on the main view), it fills the data in the table.
The fact is that this code works fine on the main view, but it does not work for other views.
Can someone tell me what I am missing or some other way to fill in a UITable on views other than the main view.
Thanks at Advance. Gaurav
uitableview
Gaurav arora
source share