Skip to content

Commit 086b9c5

Browse files
committed
Fix Issue #98
1 parent 29e6459 commit 086b9c5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Example/Objective-C/MZFormSheetPresentationController Objective-C Example/CustomTransition.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
#import <Foundation/Foundation.h>
1010
#import "MZTransition.h"
1111

12-
@interface CustomTransition : NSObject <MZFormSheetPresentationViewControllerTransitionProtocol>
12+
@interface CustomTransition : MZTransition <MZFormSheetPresentationViewControllerTransitionProtocol>
1313
@end

MZFormSheetPresentationController/MZFormSheetPresentationViewControllerAnimator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern CGFloat const MZFormSheetPresentationViewControllerAnimatorDefaultTransit
3333
@property (nonatomic, assign, getter=isPresenting) BOOL presenting;
3434
@property (nonatomic, assign, getter=isInteractive) BOOL interactive;
3535
@property (nonatomic, assign) CGFloat transitionDuration;
36-
@property (nonatomic, strong) MZTransition *transition;
36+
@property (nonatomic, strong) id<MZFormSheetPresentationViewControllerTransitionProtocol> transition;
3737

3838
+ (instancetype)animatorForTransitionStyle:(MZFormSheetPresentationTransitionStyle)transitionStyle;
3939
@end

MZFormSheetPresentationController/MZTransition.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ typedef NS_ENUM(NSInteger, MZFormSheetPresentationTransitionStyle) {
6464

6565
@end
6666

67+
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 100000
6768
@interface MZTransition
68-
: NSObject <MZFormSheetPresentationViewControllerTransitionProtocol>
69-
69+
: NSObject <MZFormSheetPresentationViewControllerTransitionProtocol>
70+
#else
71+
@interface MZTransition
72+
: NSObject <MZFormSheetPresentationViewControllerTransitionProtocol, CAAnimationDelegate>
73+
#endif
7074
/**
7175
* Register custom transition animation style.
7276
* You need to setup transitionStyle to MZFormSheetTransitionStyleCustom.

0 commit comments

Comments
 (0)