Skip to content

Instantly share code, notes, and snippets.

@r-plus
Last active December 15, 2015 19:29
Show Gist options
  • Select an option

  • Save r-plus/5312120 to your computer and use it in GitHub Desktop.

Select an option

Save r-plus/5312120 to your computer and use it in GitHub Desktop.
button or view?
UIButton *baseView = [[UIButton alloc] initWithFrame:self.frame];
baseView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
[baseView addTarget:self action:@selector(dismissActionSheet) forControlEvents:UIControlEventTouchUpInside];
UIView *baseView = [[UIView alloc] initWithFrame:self.frame];
baseView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
UITapGestureRecognizer* tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissActionSheet)];
tapGesture.delegate = self;
[baseView addGestureRecognizer:tapGesture];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment