@@ -59,8 +59,8 @@ - (void)setFrame:(CGRect)frame {
5959@interface MZFormSheetPresentationViewController ()
6060@property (nonatomic , strong ) UIViewController *contentViewController;
6161
62- @property (nonatomic , strong ) UIPanGestureRecognizer *edgeDissmisalPanGestureRecognizer ;
63- @property (nonatomic , strong ) UIPanGestureRecognizer *presentedViewDissmisalPanGestureRecognizer ;
62+ @property (nonatomic , strong ) UIPanGestureRecognizer *edgeDismissalPanGestureRecognizer ;
63+ @property (nonatomic , strong ) UIPanGestureRecognizer *presentedViewDismissalPanGestureRecognizer ;
6464@property (nonatomic , assign , getter =isPanGestureRecognized) BOOL panGestureRecognized;
6565@end
6666
@@ -128,9 +128,9 @@ - (void)setShadowRadius:(CGFloat)shadowRadius {
128128 self.view .layer .shadowRadius = shadowRadius;
129129}
130130
131- - (void )setInteractivePanGestureDissmisalDirection : (MZFormSheetPanGestureDismissDirection)interactivePanGestureDissmisalDirection {
132- _interactivePanGestureDissmisalDirection = interactivePanGestureDissmisalDirection ;
133- if (_interactivePanGestureDissmisalDirection != MZFormSheetPanGestureDismissDirectionNone) {
131+ - (void )setInteractivePanGestureDismissalDirection : (MZFormSheetPanGestureDismissDirection)interactivePanGestureDismissalDirection {
132+ _interactivePanGestureDismissalDirection = interactivePanGestureDismissalDirection ;
133+ if (_interactivePanGestureDismissalDirection != MZFormSheetPanGestureDismissDirectionNone) {
134134 [self addEdgeDismissalPanGestureRecognizer ];
135135 } else {
136136 [self removeEdgeDismissalPanGestureRecognizer ];
@@ -214,7 +214,7 @@ - (void)viewWillAppear:(BOOL)animated {
214214 [super viewWillAppear: animated];
215215 if (!self.presentedViewController ) {
216216
217- if (self.interactivePanGestureDissmisalDirection != MZFormSheetPanGestureDismissDirectionNone) {
217+ if (self.interactivePanGestureDismissalDirection != MZFormSheetPanGestureDismissDirectionNone) {
218218 [self addEdgeDismissalPanGestureRecognizer ];
219219 }
220220
@@ -262,24 +262,24 @@ - (void)viewDidDisappear:(BOOL)animated {
262262- (void )addPresentingViewDismissalPanGestureRecognizer {
263263
264264 [self removePresentingViewDismissalPanGestureRecognizer ];
265- self.presentedViewDissmisalPanGestureRecognizer = [[UIPanGestureRecognizer alloc ] initWithTarget: self action: @selector (handleDismissalPanGestureRecognizer: )];
266- [self .view addGestureRecognizer: self .presentedViewDissmisalPanGestureRecognizer ];
265+ self.presentedViewDismissalPanGestureRecognizer = [[UIPanGestureRecognizer alloc ] initWithTarget: self action: @selector (handleDismissalPanGestureRecognizer: )];
266+ [self .view addGestureRecognizer: self .presentedViewDismissalPanGestureRecognizer ];
267267}
268268
269269- (void )removePresentingViewDismissalPanGestureRecognizer {
270- [self .presentedViewDissmisalPanGestureRecognizer .view removeGestureRecognizer: self .presentedViewDissmisalPanGestureRecognizer ];
271- self.presentedViewDissmisalPanGestureRecognizer = nil ;
270+ [self .presentedViewDismissalPanGestureRecognizer .view removeGestureRecognizer: self .presentedViewDismissalPanGestureRecognizer ];
271+ self.presentedViewDismissalPanGestureRecognizer = nil ;
272272}
273273
274274- (void )addEdgeDismissalPanGestureRecognizer {
275275 [self removeEdgeDismissalPanGestureRecognizer ];
276- self.edgeDissmisalPanGestureRecognizer = [[UIPanGestureRecognizer alloc ] initWithTarget: self action: @selector (handleDismissalPanGestureRecognizer: )];
277- [self .presentationController.containerView addGestureRecognizer: self .edgeDissmisalPanGestureRecognizer ];
276+ self.edgeDismissalPanGestureRecognizer = [[UIPanGestureRecognizer alloc ] initWithTarget: self action: @selector (handleDismissalPanGestureRecognizer: )];
277+ [self .presentationController.containerView addGestureRecognizer: self .edgeDismissalPanGestureRecognizer ];
278278}
279279
280280- (void )removeEdgeDismissalPanGestureRecognizer {
281- [self .edgeDissmisalPanGestureRecognizer .view removeGestureRecognizer: self .edgeDissmisalPanGestureRecognizer ];
282- self.edgeDissmisalPanGestureRecognizer = nil ;
281+ [self .edgeDismissalPanGestureRecognizer .view removeGestureRecognizer: self .edgeDismissalPanGestureRecognizer ];
282+ self.edgeDismissalPanGestureRecognizer = nil ;
283283}
284284
285285- (void )handleDismissalPanGestureRecognizer : (UIPanGestureRecognizer *)recognizer {
@@ -292,14 +292,14 @@ - (void)handleDismissalPanGestureRecognizer:(UIPanGestureRecognizer *)recognizer
292292 self.panGestureRecognized = NO ;
293293 }
294294
295- if (recognizer == self.presentedViewDissmisalPanGestureRecognizer ) {
295+ if (recognizer == self.presentedViewDismissalPanGestureRecognizer ) {
296296 if ([self .interactionAnimatorForPresentationController respondsToSelector: @selector (handlePresentingViewDismissalPanGestureRecognizer:forPresentingView:fromViewController: )]) {
297297 [self .interactionAnimatorForPresentationController handlePresentingViewDismissalPanGestureRecognizer: recognizer forPresentingView: self .view fromViewController: self ];
298298 }
299299
300300 } else {
301301 if ([self .interactionAnimatorForPresentationController respondsToSelector: @selector (handleEdgeDismissalPanGestureRecognizer:dismissDirection:forPresentingView:fromViewController: )]) {
302- [self .interactionAnimatorForPresentationController handleEdgeDismissalPanGestureRecognizer: recognizer dismissDirection: self .interactivePanGestureDissmisalDirection forPresentingView: self .view fromViewController: self ];
302+ [self .interactionAnimatorForPresentationController handleEdgeDismissalPanGestureRecognizer: recognizer dismissDirection: self .interactivePanGestureDismissalDirection forPresentingView: self .view fromViewController: self ];
303303 }
304304 }
305305
0 commit comments