- (void)scrollViewDidScroll:(UIScrollView *)scrollView { [[tableView visibleCells] makeObjectsPerformSelector:@selector(setHighlighted:) withObject:[NSNumber numberWithBool:NO]]; CGPoint center = CGPointMake(0, scrollView.contentOffset.y+(int)(scrollView.frame.size.height/2)); NSIndexPath *cellIndexPath = [tableView indexPathForRowAtPoint:center]; UITableViewCell *cell = [tableView cellForRowAtIndexPath:cellIndexPath]; [cell setHighlighted:YES]; }
让中间的cell高亮
猜你喜欢
转载自wang-peng1.iteye.com/blog/1830734
今日推荐
周排行