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];
[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?)
scrollView parameter has zero contextOffset which means it resets galleryIndex to first image. (On iOS8 these calls return correct contentOffset).
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];
[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?) scrollView parameter has zero contextOffset which means it resets galleryIndex to first image. (On iOS8 these calls return correct contentOffset).