Skip to content

Commit

Permalink
修正多次拉開 slider, 多次上膜的問題
Browse files Browse the repository at this point in the history
  • Loading branch information
DaidoujiChen committed Dec 30, 2014
1 parent e0f198b commit ac67116
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions e-Hentai/SliderViewController/SliderViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ - (void)needToChangeViewController:(NSString *)className {
#pragma mark - IIViewDeckControllerDelegate

- (void)viewDeckController:(IIViewDeckController*)viewDeckController didOpenViewSide:(IIViewDeckSide)viewDeckSide animated:(BOOL)animated {
UIView *maskView = [[UIView alloc] initWithFrame:self.centerController.view.bounds];
maskView.userInteractionEnabled = YES;
maskView.backgroundColor = [UIColor clearColor];
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(recovery:)];
[maskView addGestureRecognizer:tapGesture];
[self.centerController.view addSubview:maskView];
self.weakMaskView = maskView;
if (!self.weakMaskView) {
UIView *maskView = [[UIView alloc] initWithFrame:self.centerController.view.bounds];
maskView.userInteractionEnabled = YES;
maskView.backgroundColor = [UIColor clearColor];
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(recovery:)];
[maskView addGestureRecognizer:tapGesture];
[self.centerController.view addSubview:maskView];
self.weakMaskView = maskView;
}
}

- (void)viewDeckController:(IIViewDeckController*)viewDeckController didCloseViewSide:(IIViewDeckSide)viewDeckSide animated:(BOOL)animated {
Expand Down

0 comments on commit ac67116

Please sign in to comment.