FlorianMielke / FMMoveTableView

Discontinued: Please use iOS 11's Drag & Drop capability instead.
MIT License
623 stars 101 forks source link

ios 6 support with this little #26

Closed eyeswideopen closed 10 years ago

eyeswideopen commented 10 years ago

if

//fix for ios 6 (snapshotViewAfterScreenUpdates not implemented)
    if(![touchedCell respondsToSelector:@selector(snapshotViewAfterScreenUpdates:)]){

        UIGraphicsBeginImageContextWithOptions(touchedCell.bounds.size, NO, 0.0);

        [touchedCell.layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        UIImageView * imageView =[[UIImageView alloc]initWithImage:img];
        imageView.frame = touchedCell.frame;
        [imageView setBackgroundColor:[UIColor clearColor]];
        return imageView;
    }

is added to

    - (UIView *)snapShotFromRowAtMovingIndexPath

(obviously before the snapshot is taken) your awesome lib works just fine for me in ios 6!

thanks for your work

FlorianMielke commented 10 years ago

Thanks for the hint. But since iOS6 is installed on a very rare base I won't re-add support for iOS6. Therefor please fork the project.