Rodhos Soft

備忘録を兼ねた技術的なメモです。Rofhos SoftではiOSアプリ開発を中心としてAndroid, Webサービス等の開発を承っております。まずはご相談下さい。

UIViewControllerTransitionCoordinator

まず

typedef NSString * UITransitionContextViewControllerKey NS_EXTENSIBLE_STRING_ENUM;
typedef NSString * UITransitionContextViewKey NS_EXTENSIBLE_STRING_ENUM;

TransitionCoordinatorContext

@protocol UIViewControllerTransitionCoordinatorContext <NSObject>

@property(nonatomic, readonly, getter=isAnimated) BOOL animated;
@property(nonatomic, readonly) UIModalPresentationStyle presentationStyle;
@property(nonatomic, readonly) BOOL initiallyInteractive;
@property(nonatomic,readonly) BOOL isInterruptible NS_AVAILABLE_IOS(10_0);
@property(nonatomic, readonly, getter=isInteractive) BOOL interactive;
@property(nonatomic, readonly, getter=isCancelled) BOOL cancelled;
@property(nonatomic, readonly) NSTimeInterval transitionDuration;
@property(nonatomic, readonly) CGFloat percentComplete;
@property(nonatomic, readonly) CGFloat completionVelocity;
@property(nonatomic, readonly) UIViewAnimationCurve completionCurve;
- (nullable __kindof UIViewController *)viewControllerForKey:(UITransitionContextViewControllerKey)key;
- (nullable __kindof UIView *)viewForKey:(UITransitionContextViewKey)key NS_AVAILABLE_IOS(8_0);
@property(nonatomic, readonly) UIView *containerView;
@property(nonatomic, readonly) CGAffineTransform targetTransform NS_AVAILABLE_IOS(8_0);
@end

TransitionCoordinator

@protocol UIViewControllerTransitionCoordinator <UIViewControllerTransitionCoordinatorContext>

- (BOOL)animateAlongsideTransition:(void (^ __nullable)(id <UIViewControllerTransitionCoordinatorContext>context))animation
                        completion:(void (^ __nullable)(id <UIViewControllerTransitionCoordinatorContext>context))completion;

- (BOOL)animateAlongsideTransitionInView:(nullable UIView *)view
                               animation:(void (^ __nullable)(id <UIViewControllerTransitionCoordinatorContext>context))animation
                              completion:(void (^ __nullable)(id <UIViewControllerTransitionCoordinatorContext>context))completion;

- (void)notifyWhenInteractionEndsUsingBlock: (void (^)(id <UIViewControllerTransitionCoordinatorContext>context))handler NS_DEPRECATED_IOS(7_0, 10_0,"Use notifyWhenInteractionChangesUsingBlock");

- (void)notifyWhenInteractionChangesUsingBlock: (void (^)(id <UIViewControllerTransitionCoordinatorContext>context))handler NS_AVAILABLE_IOS(10_0);

@end

UIViewControllerのTransitionCoordinatorプロパティ

@interface UIViewController(UIViewControllerTransitionCoordinator)
@property(nonatomic, readonly, nullable) id <UIViewControllerTransitionCoordinator> transitionCoordinator NS_AVAILABLE_IOS(7_0);
@end