From 1113450aa5c54a73c2d631199c2cb7c63aa32eb9 Mon Sep 17 00:00:00 2001 From: Tony Mann Date: Wed, 13 Apr 2016 15:34:16 -0600 Subject: [PATCH] Change "dissmisal" to "dismissal" --- .../ViewController.swift | 2 +- .../MZFormSheetPresentationViewController.h | 2 +- .../MZFormSheetPresentationViewController.m | 32 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift b/Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift index 7e69ec6..134f6a4 100644 --- a/Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift +++ b/Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift @@ -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) } diff --git a/MZFormSheetPresentationController/MZFormSheetPresentationViewController.h b/MZFormSheetPresentationController/MZFormSheetPresentationViewController.h index e9af205..ff9c3ea 100644 --- a/MZFormSheetPresentationController/MZFormSheetPresentationViewController.h +++ b/MZFormSheetPresentationController/MZFormSheetPresentationViewController.h @@ -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. diff --git a/MZFormSheetPresentationController/MZFormSheetPresentationViewController.m b/MZFormSheetPresentationController/MZFormSheetPresentationViewController.m index fe17343..bb99bb6 100755 --- a/MZFormSheetPresentationController/MZFormSheetPresentationViewController.m +++ b/MZFormSheetPresentationController/MZFormSheetPresentationViewController.m @@ -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 @@ -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]; @@ -214,7 +214,7 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (!self.presentedViewController) { - if (self.interactivePanGestureDissmisalDirection != MZFormSheetPanGestureDismissDirectionNone) { + if (self.interactivePanGestureDismissalDirection != MZFormSheetPanGestureDismissDirectionNone) { [self addEdgeDismissalPanGestureRecognizer]; } @@ -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 { @@ -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]; } }