Hi everyone
I'm trying to put 2 TableViews on a single UIView. I've implemented the methods needed. I've tested the apps with breakpoints and the project fails at this method.
I have 2 tableviews : radios_tv and presets_tv Two arrays from the delegate from which count is obtained: array_radios and array_presets array_radios contains 10 elements. array_presets contains 30 elements.
I've tested for the part:
if (tableView == self.presets_tv) {
return appDelegate.array_presets.count; //Contains 30 elements in the array_radios
}
Everything is ok if I put return anything below 10. But the project fails with a SIGABRT error if the return is greater than 10 and in my case, as the array_presets contains 30 elements, it fails.
Below is my code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
MyApplicationAppDelegate *appDelegate = (MyApplicationAppDelegate *)[[UIApplication sharedApplication] delegate];
if (tableView == self.radios_tv){
return appDelegate.array_radios.count; //Contains 10 elements in the array_radios
}
if (tableView == self.presets_tv) {
return appDelegate.array_presets.count; //Contains 30 elements in the array_radios
}
}
Could you help me please. I can't see what is wrong...
Thanks