[ad_1]
How do you scroll to the very prime of a desk view in iOS 15? This labored for me in earlier variations of iOS, however iOS 15 provides additional padding for part header views. This not scrolls to the precise prime of the view.
NSInteger sections = [self numberOfSectionsInTableView:self.tableView];
if(sections)
{
for(NSInteger i=0; i<sections; i++)
{
NSInteger rows = [self tableView:self.tableView numberOfRowsInSection:i];
if(rows)
{
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:i];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
break;
}
}
}
[ad_2]
