Skip to content

Commit

Permalink
Merge pull request mwaterfall#204 from dchohfi/master
Browse files Browse the repository at this point in the history
Adding property to manage delay time to hide interface.
  • Loading branch information
mwaterfall committed Mar 6, 2014
2 parents 68ba43a + 812c87a commit a30b9c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions MWPhotoBrowser/Classes/MWPhotoBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion MWPhotoBrowser/Classes/MWPhotoBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
}
}

Expand Down

0 comments on commit a30b9c5

Please sign in to comment.