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

Setting initial gallery index does not work on iOS9 if presenting navigation controller navbar is not translucent #11

Open
xjki opened this issue Nov 16, 2015 · 0 comments

Comments

@xjki
Copy link

xjki commented Nov 16, 2015

When presenting RMGalleryView on iOS9 from navigation controller if navigationController.navigationBar.translucent = NO, setting initial galleryIndex will fail (will display gallery with first image instead of image set by galleryIndex property).

On first call after [self setContentOffset:offset animated:animated];
first-call
[RMGalleryView scrollViewDidScroll:] scrollView parameter returns correct contentOffset for scrollview so galleryIndex remains as intended.

On iOS9 on second [RMGalleryView scrollViewDidScroll:] call by iOS itself (view inset adjustments performed by navigation controller?)
secon-call
scrollView parameter has zero contextOffset which means it resets galleryIndex to first image. (On iOS8 these calls return correct contentOffset).

@xjki xjki changed the title Setting initial gallery index fails on iOS9 if presenting navigation controller navbar is not translucent Setting initial gallery index does not work on iOS9 if presenting navigation controller navbar is not translucent Nov 16, 2015
xjki added a commit to xjki/RMGallery that referenced this issue Aug 31, 2016
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

1 participant