I have two sections in tableview that is located inside tableviewcontroller For some reason the section value in method numberOfRowsInSection is always "1". Thats quite strange because, everything seems fine.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
int i=section;
if(section==0)
return 1;
else{
return [self.flightDetailsArray count];
}
}
In storyboard i have a table with two sections
Ok, once again doing it for you to understand the problem. Watch this code
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
NSLog(@"Section: %d",(int)section);
if(section==0)
return 1;
else{
return [self.flightDetailsArray count];
}
}
in Log i see "1" always what's that? its strange
0
? – Droppy