-
Notifications
You must be signed in to change notification settings - Fork 140
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
iPad version - completely broken in popOvers #8
Comments
I pushed the latest version, which should take care of those issues. If not please let me know. Devin |
Devin, I'll try them out. Thank you very much…I struggled trying to fix myself and can't easily explain how much I appreciate this and your efforts. I'll let you know how I get on. |
Hi Devin Been testing out the new version. Everything is OK if the PhotoViewer is presented in a brand new popOver. The issue I have is that I already have a popOver on screen and this allow the user to click a photo thumbnail. I then define the source, create the PhotoViewer, resize the popOver content and then push it on an existing navigationController using pushViewController. To all intents and purpose the PhotoViewer appears and looks OK (it is in a popOver beit created earlier). However when you start to drag images back and forth or even use the navigation arrows , it appears the scroll view's width or position calculation per image is all over the place. I hope this makes sense. So basically to test, create a popOver and then try pushing the PhotoViewer onto it to see what happens. Thanks, M |
I think the issue is that this photoviewer does not know it is actually being displayed in a popOver… |
Yep you're definitely right. It should have been checking the navigation controller view hierarchy for the popover. The latest revision should fix that :) |
I shall try it now…thank you :-) |
Devin, well I think you're absolutely brilliant! It is working. However I have noticed a couple of issues:
I can live with this personally but just in case there is an obvious fix.
Either way thank you again. really appreciate your efforts and help with this! |
Thanks! Both of those should be fixed with the revision I just pushed. In regards to the first one, I added an observer to the photo view controllers contentSizeForViewInPopover:, if you change contentSizeForViewInPopover: just make sure it's after the controller is in the nav stack. For example: |
Hi Devin, Just tried the latest version.
A note to any one else reading this, it you call movetoPhotoIndex before the view appears, makes sure it comes after any code setting the contentSizeForView. For Example [self.navigationController pushViewController:photoController animated:YES];
Thanks again, Michael. |
Re point 2 above the fullsize toggle button not showing, I found a bug. Line 353 EGOPhotoViewController: UIBarButtonItem *scaleButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"egopv_fullscreen_button.png.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(toggleFullScreen:)]; has an extra ".png" suffix in the image name. Should be: UIBarButtonItem *scaleButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"egopv_fullscreen_button.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(toggleFullScreen:)]; Finally I fixed something myself :-) |
good catch, thanks! |
Number of issues:
Scrolling images on the iPad in popOvers is completely broken. It may work if all images are the same size but won't currently work with the way you calculate the centre of the image being scrolled to as the calculation is based on a fixed sized images.
Things are further aggravated by the copious amounts of hardcoded assumptions when using on an iPad. For example just because images are being shown in popOvers doesn't mean they need to be auto resized. It may be helpful to expose a few more of these private properties too.
The text was updated successfully, but these errors were encountered: