From 4abc73fa997520a2febb5e06daf1649cfb29366a Mon Sep 17 00:00:00 2001 From: jki Date: Wed, 31 Aug 2016 15:00:58 +0300 Subject: [PATCH] Workaround for initial galery index seting problem on iPad. (Issue #11) in original RMGallery repo. --- RMGallery/RMGalleryViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RMGallery/RMGalleryViewController.m b/RMGallery/RMGalleryViewController.m index b1b8a52..e9791cf 100644 --- a/RMGallery/RMGalleryViewController.m +++ b/RMGallery/RMGalleryViewController.m @@ -72,9 +72,9 @@ - (void)viewDidLoad [self.view addGestureRecognizer:_tapGestureRecognizer]; } -- (void)viewWillAppear:(BOOL)animated +- (void)viewDidLayoutSubviews { - [super viewWillAppear:animated]; + [super viewDidLayoutSubviews]; if (!_initialGalleryIndexSet) { // In case the gallery index was set before the view was loaded