The problem is my UITableView automatically scrolls to top when I touch/select any cell.
I have no idea what might be the problem.
Here is the structure of my UITableView:
UITableViewController
-table header:
-UIView
-UIScrollView with paging enabled
-UIPageControl
-Prototype Cell:
-UIView
- 3 UITextLabels
ADDED:
here is my code to show detailed view when cell is pressed, I don’t use didSelectRowAtIndex
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"ShowEventDetails"]) {
NSIndexPath *selectedRowIndex = [self.tableView indexPathForSelectedRow];
EventDetailsViewController *detailViewController = [segue destinationViewController];
detailViewController.event = [listOfEvents.eventsList objectAtIndex:selectedRowIndex.row];
}
}
Thank you in advance for your help!
I have fixed that by disabling
pagingEnabledproperty fortableView.Can anyone explain how can paging effect on tableview scrolling to top ??