To run the example project, clone the repo, and run pod install
from the Example directory first.
To use this Pod, add and remove touchBehind gesture recognizer as follow:
#import "UIViewController+Dismissible.h"
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// add gesture recognizer to UIWindow
[self.view.window addGestureRecognizer:self.tapBehindGesture];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
// remove gesture recognizer from UIWindow
[self.view.window removeGestureRecognizer:self.tapBehindGesture];
}
ARC
UIViewController+Dismissible is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "UIViewController+Dismissible"
Xingruo Liu, [email protected]
UIViewController+Dismissible is available under the MIT license. See the LICENSE file for more info.