Skip to content

Commit

Permalink
Merge pull request #79 from nextforce/dismissal-typo
Browse files Browse the repository at this point in the history
Fix "dismissal" misspelling
  • Loading branch information
m1entus committed Apr 14, 2016
2 parents 3907ad5 + 1113450 commit e900094
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class ViewController: UITableViewController {
func panGestureDismissingGesture() {
let navigationController = self.formSheetControllerWithNavigationController()
let formSheetController = MZFormSheetPresentationViewController(contentViewController: navigationController)
formSheetController.interactivePanGestureDissmisalDirection = .All;
formSheetController.interactivePanGestureDismissalDirection = .All;
self.presentViewController(formSheetController, animated: true, completion: nil)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef void(^MZFormSheetPresentationViewControllerCompletionHandler)(UIViewCont
* Allow dismiss the modals by swiping up/down/left/right on the navigation bar.
* By default, this is None.
*/
@property (nonatomic, assign) MZFormSheetPanGestureDismissDirection interactivePanGestureDissmisalDirection;
@property (nonatomic, assign) MZFormSheetPanGestureDismissDirection interactivePanGestureDismissalDirection;

/**
* Allow dismiss the modals by swiping up/down/left/right on the presented view.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ - (void)setFrame:(CGRect)frame {
@interface MZFormSheetPresentationViewController ()
@property (nonatomic, strong) UIViewController *contentViewController;

@property (nonatomic, strong) UIPanGestureRecognizer *edgeDissmisalPanGestureRecognizer;
@property (nonatomic, strong) UIPanGestureRecognizer *presentedViewDissmisalPanGestureRecognizer;
@property (nonatomic, strong) UIPanGestureRecognizer *edgeDismissalPanGestureRecognizer;
@property (nonatomic, strong) UIPanGestureRecognizer *presentedViewDismissalPanGestureRecognizer;
@property (nonatomic, assign, getter=isPanGestureRecognized) BOOL panGestureRecognized;
@end

Expand Down Expand Up @@ -128,9 +128,9 @@ - (void)setShadowRadius:(CGFloat)shadowRadius {
self.view.layer.shadowRadius = shadowRadius;
}

- (void)setInteractivePanGestureDissmisalDirection:(MZFormSheetPanGestureDismissDirection)interactivePanGestureDissmisalDirection {
_interactivePanGestureDissmisalDirection = interactivePanGestureDissmisalDirection;
if (_interactivePanGestureDissmisalDirection != MZFormSheetPanGestureDismissDirectionNone) {
- (void)setInteractivePanGestureDismissalDirection:(MZFormSheetPanGestureDismissDirection)interactivePanGestureDismissalDirection {
_interactivePanGestureDismissalDirection = interactivePanGestureDismissalDirection;
if (_interactivePanGestureDismissalDirection != MZFormSheetPanGestureDismissDirectionNone) {
[self addEdgeDismissalPanGestureRecognizer];
} else {
[self removeEdgeDismissalPanGestureRecognizer];
Expand Down Expand Up @@ -214,7 +214,7 @@ - (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (!self.presentedViewController) {

if (self.interactivePanGestureDissmisalDirection != MZFormSheetPanGestureDismissDirectionNone) {
if (self.interactivePanGestureDismissalDirection != MZFormSheetPanGestureDismissDirectionNone) {
[self addEdgeDismissalPanGestureRecognizer];
}

Expand Down Expand Up @@ -262,24 +262,24 @@ - (void)viewDidDisappear:(BOOL)animated {
- (void)addPresentingViewDismissalPanGestureRecognizer {

[self removePresentingViewDismissalPanGestureRecognizer];
self.presentedViewDissmisalPanGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleDismissalPanGestureRecognizer:)];
[self.view addGestureRecognizer:self.presentedViewDissmisalPanGestureRecognizer];
self.presentedViewDismissalPanGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleDismissalPanGestureRecognizer:)];
[self.view addGestureRecognizer:self.presentedViewDismissalPanGestureRecognizer];
}

- (void)removePresentingViewDismissalPanGestureRecognizer {
[self.presentedViewDissmisalPanGestureRecognizer.view removeGestureRecognizer:self.presentedViewDissmisalPanGestureRecognizer];
self.presentedViewDissmisalPanGestureRecognizer = nil;
[self.presentedViewDismissalPanGestureRecognizer.view removeGestureRecognizer:self.presentedViewDismissalPanGestureRecognizer];
self.presentedViewDismissalPanGestureRecognizer = nil;
}

- (void)addEdgeDismissalPanGestureRecognizer {
[self removeEdgeDismissalPanGestureRecognizer];
self.edgeDissmisalPanGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleDismissalPanGestureRecognizer:)];
[self.presentationController.containerView addGestureRecognizer:self.edgeDissmisalPanGestureRecognizer];
self.edgeDismissalPanGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleDismissalPanGestureRecognizer:)];
[self.presentationController.containerView addGestureRecognizer:self.edgeDismissalPanGestureRecognizer];
}

- (void)removeEdgeDismissalPanGestureRecognizer {
[self.edgeDissmisalPanGestureRecognizer.view removeGestureRecognizer:self.edgeDissmisalPanGestureRecognizer];
self.edgeDissmisalPanGestureRecognizer = nil;
[self.edgeDismissalPanGestureRecognizer.view removeGestureRecognizer:self.edgeDismissalPanGestureRecognizer];
self.edgeDismissalPanGestureRecognizer = nil;
}

- (void)handleDismissalPanGestureRecognizer:(UIPanGestureRecognizer *)recognizer {
Expand All @@ -292,14 +292,14 @@ - (void)handleDismissalPanGestureRecognizer:(UIPanGestureRecognizer *)recognizer
self.panGestureRecognized = NO;
}

if (recognizer == self.presentedViewDissmisalPanGestureRecognizer) {
if (recognizer == self.presentedViewDismissalPanGestureRecognizer) {
if ([self.interactionAnimatorForPresentationController respondsToSelector:@selector(handlePresentingViewDismissalPanGestureRecognizer:forPresentingView:fromViewController:)]) {
[self.interactionAnimatorForPresentationController handlePresentingViewDismissalPanGestureRecognizer:recognizer forPresentingView:self.view fromViewController:self];
}

} else {
if ([self.interactionAnimatorForPresentationController respondsToSelector:@selector(handleEdgeDismissalPanGestureRecognizer:dismissDirection:forPresentingView:fromViewController:)]) {
[self.interactionAnimatorForPresentationController handleEdgeDismissalPanGestureRecognizer:recognizer dismissDirection:self.interactivePanGestureDissmisalDirection forPresentingView:self.view fromViewController:self];
[self.interactionAnimatorForPresentationController handleEdgeDismissalPanGestureRecognizer:recognizer dismissDirection:self.interactivePanGestureDismissalDirection forPresentingView:self.view fromViewController:self];
}
}

Expand Down

0 comments on commit e900094

Please sign in to comment.