diff --git a/MWPhotoBrowser/Classes/MWPhotoBrowser.h b/MWPhotoBrowser/Classes/MWPhotoBrowser.h index 7ceae443d..ecc99f974 100644 --- a/MWPhotoBrowser/Classes/MWPhotoBrowser.h +++ b/MWPhotoBrowser/Classes/MWPhotoBrowser.h @@ -47,6 +47,7 @@ @property (nonatomic) BOOL alwaysShowControls; @property (nonatomic) BOOL enableGrid; @property (nonatomic) BOOL startOnGrid; +@property (nonatomic) NSUInteger delayToHideElements; @property (nonatomic, readonly) NSUInteger currentIndex; // Init diff --git a/MWPhotoBrowser/Classes/MWPhotoBrowser.m b/MWPhotoBrowser/Classes/MWPhotoBrowser.m index e76ab96bc..fd9a06862 100644 --- a/MWPhotoBrowser/Classes/MWPhotoBrowser.m +++ b/MWPhotoBrowser/Classes/MWPhotoBrowser.m @@ -71,6 +71,7 @@ - (void)_initialisation { _viewIsActive = NO; _enableGrid = YES; _startOnGrid = NO; + _delayToHideElements = 5; _visiblePages = [[NSMutableSet alloc] init]; _recycledPages = [[NSMutableSet alloc] init]; _photos = [[NSMutableArray alloc] init]; @@ -1357,7 +1358,7 @@ - (void)cancelControlHiding { - (void)hideControlsAfterDelay { if (![self areControlsHidden]) { [self cancelControlHiding]; - _controlVisibilityTimer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(hideControls) userInfo:nil repeats:NO]; + _controlVisibilityTimer = [NSTimer scheduledTimerWithTimeInterval:self.delayToHideElements target:self selector:@selector(hideControls) userInfo:nil repeats:NO]; } }