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

images not displaying with iOS 8 #38

Open
joliylee opened this issue Sep 19, 2014 · 6 comments
Open

images not displaying with iOS 8 #38

joliylee opened this issue Sep 19, 2014 · 6 comments

Comments

@joliylee
Copy link

If you comment out [self setNeedsUpdateConstraints] in AGPhotoBrowserCell.m the images are displayed. But [statusBarDidChangeFrame] has a problem.

@arno608rw
Copy link

I comment out [self setNeedsUpdateConstraints] in AGPhotoBrowserCell.m. It's work in iOS7 and iOS8

#pragma mark - Setters

  • (void)setCellImage:(UIImage *)cellImage
    {
    [self.zoomableView setImage:cellImage];
    //[self setNeedsUpdateConstraints];
    }

@robmontesinos
Copy link

I commented out [self setNeedsUpdateContraints] in setCellImage: method, and the image has returned. Thank you.
But now the image sizes are off a bit and rotating to landscape does not work at all. Image gets squashed. Has anyone else experienced this? Any fixes on the horizon?

@marcd
Copy link

marcd commented Oct 23, 2014

The zoomableview frame is getting set to (0,0,0,0). The root of this problem can be found in https://developer.apple.com/library/prerelease/ios/technotes/tn2154/_index.html
I have made several attempts in the sample project to resolve this based on the tech note but a solution for AGPhotoBrowser is beyond me.

@ctku
Copy link

ctku commented Nov 3, 2014

In AGPhotoBrowserCell.m->setCellImage:, I tried to set its frame as parent view's bounds and set its bounds as full screen based on device orientation. It works for me. Hope it's helpful.

  • (void)setCellImage:(UIImage *)cellImage
    {
    [self.zoomableView setImage:cellImage];

    // set frame as parent view's bounds
    self.zoomableView.frame = self.bounds;

    // set bounds based on device orientation
    CGFloat w = CGRectGetWidth([[UIScreen mainScreen] bounds]);
    CGFloat h = CGRectGetHeight([[UIScreen mainScreen] bounds]);
    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
    if (UIDeviceOrientationIsLandscape(orientation)) {
    self.zoomableView.bounds = CGRectMake(0, 0, h, w);
    } else {
    self.zoomableView.bounds = CGRectMake(0, 0, w, h);
    }
    }

@AlbertoLourenco
Copy link

Thanks, @joliylee :D

@Meterwhite
Copy link

Thanks @ctku

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

7 participants