Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setInitialPageIndex strange animation if not first image #127

Closed
x2on opened this issue Apr 4, 2015 · 4 comments
Closed

setInitialPageIndex strange animation if not first image #127

x2on opened this issue Apr 4, 2015 · 4 comments

Comments

@x2on
Copy link

x2on commented Apr 4, 2015

Hi,

if i use setInitialPageIndex and opens the Photo Browser the animation is strange.
It animates from the first image to the initial page index, also on hiding the browser.

If i open from the first image the animation is fine.

Any ideas?

@vic3ai
Copy link

vic3ai commented Apr 14, 2015

Hi x2on, can show how to use setInitialPageIndex ?

@x2on
Copy link
Author

x2on commented Apr 14, 2015

I use it like this:

NSMutableArray *images = [NSMutableArray arrayWithCapacity:[imageSources count]];
for (id object in imageSources) {
    IDMPhoto *image;
    if (mode == ImageGalleryModeURL) {
        NSURL *url = (NSURL *)object;
        image = [IDMPhoto photoWithURL:url];
    }
    else {
        GalleryImage *galleryImage = (GalleryImage *)object;
        image = [IDMPhoto photoWithImage:galleryImage.image];
    }
    [images addObject:image];
}

IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:images animatedFromView:galleryCell.imageGallery.currentImageView];
[browser setInitialPageIndex:idx];
browser.displayArrowButton = NO;
browser.scaleImage = galleryCell.imageGallery.currentImageView.image;
browser.delegate = self;
[self.navigationController presentViewController:browser animated:YES completion:nil];

@x2on
Copy link
Author

x2on commented Aug 4, 2015

Any thoughts on this issue?

@saintjab
Copy link

saintjab commented Jun 2, 2016

@x2on, I don't know if you had solved the issue but for me, I realised it only happens if I use browser.scaleImage before presenting the view.

@x2on x2on closed this as completed Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants