IDMPhotoBrowser icon indicating copy to clipboard operation
IDMPhotoBrowser copied to clipboard

Can not play animation in a ModalViewController

Open JPlay opened this issue 11 years ago • 5 comments

1.create a viewController,and present it. ViewController *vc = [[ViewController alloc] init]; [self presentViewController:vc animated:YES completion:nil];

2.use IDMPhotoBrowser NSArray *list = @[[UIImage imageNamed:@"photo1l.jpg"], [UIImage imageNamed:@"photo3l.jpg"], [UIImage imageNamed:@"photo2l.jpg"] ]; NSArray *listPhoto = [IDMPhoto photosWithImages:list]; IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:listPhoto animatedFromView:imageView]; [self presentViewController:browser animated:YES completion:nil];

3.now,when I drag the image,the background is always black.

db12f54a-32bf-48da-8057-068e85d5f3d6

JPlay avatar May 12 '14 14:05 JPlay

+1 for this issue!

sprint84 avatar May 13 '14 21:05 sprint84

I can reproduce this issue, but I don't know how to fix it yet. I'm presuming there is an OS limitation around modal view controllers. When the second modal view controller is presented, the first one is probably being removed from view hierarchy.

sprint84 avatar May 14 '14 21:05 sprint84

Anyone manage to fix this yet? I'm getting the same issue.

pranavss11 avatar Jun 13 '14 00:06 pranavss11

+1

bawn avatar Apr 05 '16 08:04 bawn

@JPlay @pranavss11 @sprint84

Temporary solution, In IDMPhotoBrowser.m move [self performPresentAnimation]; function to - (void)viewWillAppear:(BOOL)animated

- (void)viewWillAppear:(BOOL)animated {
    // Update
    [self reloadData];

    // Super
    [super viewWillAppear:animated];

    // Status Bar
    _statusBarOriginallyHidden = [UIApplication sharedApplication].statusBarHidden;

    // Update UI
    [self hideControlsAfterDelay];

    [self performPresentAnimation];
}

bawn avatar Apr 05 '16 11:04 bawn