I should want to play video in to the UITableView top cell/row. My problem is that. How to play video into a top visible row and how to recognised the top cell of the UITableView, while we will scroll the UITableView up and down.
You can use UITableView's -indexPathsForVisibleRows or -indexPathForRowAtPoint.
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
NSIndexPath *topVisibleIndexPath = [[self.yourtableView indexPathsForVisibleRows] objectAtIndex:0];
NSLog(@"top visible cell's section: %i, get row: %i", topVisibleIndexPath.section, topVisibleIndexPath.row);
}
for additional reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With