UITableViewCell出现动画

UITableViewCell出现动画

// 当cell 将要显示的时候调用
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
    
    cell.transform = CGAffineTransformMakeTranslation(self.view.width, 0);
    
    [UIView animateWithDuration:0.5f animations:^{
        cell.transform = CGAffineTransformIdentity;
    }];
    
}

猜你喜欢

转载自www.cnblogs.com/StevenHuSir/p/10012707.html