Skip to content

Commit e900094

Browse files
committed
Merge pull request #79 from nextforce/dismissal-typo
Fix "dismissal" misspelling
2 parents 3907ad5 + 1113450 commit e900094

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class ViewController: UITableViewController {
150150
func panGestureDismissingGesture() {
151151
let navigationController = self.formSheetControllerWithNavigationController()
152152
let formSheetController = MZFormSheetPresentationViewController(contentViewController: navigationController)
153-
formSheetController.interactivePanGestureDissmisalDirection = .All;
153+
formSheetController.interactivePanGestureDismissalDirection = .All;
154154
self.presentViewController(formSheetController, animated: true, completion: nil)
155155
}
156156

MZFormSheetPresentationController/MZFormSheetPresentationViewController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ typedef void(^MZFormSheetPresentationViewControllerCompletionHandler)(UIViewCont
6262
* Allow dismiss the modals by swiping up/down/left/right on the navigation bar.
6363
* By default, this is None.
6464
*/
65-
@property (nonatomic, assign) MZFormSheetPanGestureDismissDirection interactivePanGestureDissmisalDirection;
65+
@property (nonatomic, assign) MZFormSheetPanGestureDismissDirection interactivePanGestureDismissalDirection;
6666

6767
/**
6868
* Allow dismiss the modals by swiping up/down/left/right on the presented view.

MZFormSheetPresentationController/MZFormSheetPresentationViewController.m

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)