Skip to content

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

Description

@xjki

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions