From 086b9c58ef915866a69ab2fd8f368e91fd4ac256 Mon Sep 17 00:00:00 2001 From: Michal Zaborowski Date: Sat, 23 Jul 2016 11:06:40 +0200 Subject: [PATCH] Fix Issue #98 --- .../CustomTransition.h | 2 +- .../MZFormSheetPresentationViewControllerAnimator.h | 2 +- MZFormSheetPresentationController/MZTransition.h | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Example/Objective-C/MZFormSheetPresentationController Objective-C Example/CustomTransition.h b/Example/Objective-C/MZFormSheetPresentationController Objective-C Example/CustomTransition.h index fb610bf..175cea8 100644 --- a/Example/Objective-C/MZFormSheetPresentationController Objective-C Example/CustomTransition.h +++ b/Example/Objective-C/MZFormSheetPresentationController Objective-C Example/CustomTransition.h @@ -9,5 +9,5 @@ #import #import "MZTransition.h" -@interface CustomTransition : NSObject +@interface CustomTransition : MZTransition @end diff --git a/MZFormSheetPresentationController/MZFormSheetPresentationViewControllerAnimator.h b/MZFormSheetPresentationController/MZFormSheetPresentationViewControllerAnimator.h index 6cecf20..9a07250 100644 --- a/MZFormSheetPresentationController/MZFormSheetPresentationViewControllerAnimator.h +++ b/MZFormSheetPresentationController/MZFormSheetPresentationViewControllerAnimator.h @@ -33,7 +33,7 @@ extern CGFloat const MZFormSheetPresentationViewControllerAnimatorDefaultTransit @property (nonatomic, assign, getter=isPresenting) BOOL presenting; @property (nonatomic, assign, getter=isInteractive) BOOL interactive; @property (nonatomic, assign) CGFloat transitionDuration; -@property (nonatomic, strong) MZTransition *transition; +@property (nonatomic, strong) id transition; + (instancetype)animatorForTransitionStyle:(MZFormSheetPresentationTransitionStyle)transitionStyle; @end diff --git a/MZFormSheetPresentationController/MZTransition.h b/MZFormSheetPresentationController/MZTransition.h index b0dfb18..2e5b918 100644 --- a/MZFormSheetPresentationController/MZTransition.h +++ b/MZFormSheetPresentationController/MZTransition.h @@ -64,9 +64,13 @@ typedef NS_ENUM(NSInteger, MZFormSheetPresentationTransitionStyle) { @end +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 100000 @interface MZTransition - : NSObject - +: NSObject +#else +@interface MZTransition +: NSObject +#endif /** * Register custom transition animation style. * You need to setup transitionStyle to MZFormSheetTransitionStyleCustom.