一、View想關操作
- 判斷兩個View是否是另一個View的子View
BOOL res = [view isDescendantOfView:self.view];
- 判斷當前Cell是否顯示
- (BOOL)isShowCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath {
CGRect rect = [tableView rectForRowAtIndexPath:indexPath];
return CGRectIntersectsRect(tableView.bounds, rect);
}