Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexito4/uitapoutsidegesturerecognizer

UITapOutsideGestureRecognizer is a subclass of UIGestureRecognizer that is executed with any tap OUTSIDE one view.
https://github.com/alexito4/uitapoutsidegesturerecognizer

Last synced: 1 day ago
JSON representation

UITapOutsideGestureRecognizer is a subclass of UIGestureRecognizer that is executed with any tap OUTSIDE one view.

Awesome Lists containing this project

README

        

UITapOutsideGestureRecognizer
=============================

UITapOutsideGestureRecognizer is a subclass of UIGestureRecognizer that is executed with any tap **OUTSIDE** one view.

# Use

The use of this UITapGestureRecognizer subclass differs a little from the rest.
You create the UITapOutsideGestureRecognizer as always but using the method:

- (id)initWithTarget:(id)target action:(SEL)action view:(UIView *)view;

In the view parameter you pass the **view in wich you want to apply the gesture recognizer**.

The you need to **add the gesture to the controller view**.

# Example

UITapOutsideGestureRecognizer *tap = [[UITapOutsideGestureRecognizer alloc] initWithTarget:self action:@selector(tapOutside:) view:self.importantView];
[self.view addGestureRecognizer:tap];