This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface ViewControllerTests : XCTestCase | |
| @property (nonatomic) CustomViewController *viewController; | |
| @property (nonatomic) BOOL beenDealloc; | |
| @property (nonatomic) id<AspectToken> aspectToken; | |
| @end | |
| - (void)setUp { | |
| [super setUp]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| typedef NS_ENUM(NSInteger, ModalAnimatedTransitioningType) { | |
| ModalAnimatedTransitioningTypePresent, | |
| ModalAnimatedTransitioningTypeDismiss | |
| }; | |
| @interface BaseAnimator : NSObject <UIViewControllerAnimatedTransitioning> | |
| @property (nonatomic) ModalAnimatedTransitioningType transitionType; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "BaseAnimator.h" | |
| @implementation BaseAnimator | |
| - (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext | |
| { | |
| UIViewController *to = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; | |
| UIViewController *from = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; | |
| if (self.transitionType == ModalAnimatedTransitioningTypePresent) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "BaseAnimator.h" | |
| @interface MiniToLargeViewAnimator : BaseAnimator | |
| @property (nonatomic) CGFloat initialY; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "MiniToLargeViewAnimator.h" | |
| static NSTimeInterval kAnimationDuration = .4f; | |
| static NSString *const kFadeoutAnimationKey = @"FadeoutAnimationKey"; | |
| static NSString *const kFadeinAnimationKey = @"FadeinAnimationKey"; | |
| @implementation MiniToLargeViewAnimator | |
| - (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface ExistViewController () <UIViewControllerTransitioningDelegate> | |
| @end | |
| @implementation BaseNavigationViewController | |
| - (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed | |
| { | |
| MiniToLargeViewAnimator *animator = [[MiniToLargeViewAnimator alloc] init]; | |
| animator.initialY = bottomBarHeight; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <UIKit/UIKit.h> | |
| @interface MiniToLargeViewInteractive : UIPercentDrivenInteractiveTransition | |
| @property (nonatomic) UIViewController *viewController; | |
| @property (nonatomic) UIViewController *presentViewController; | |
| @property (nonatomic) UIPanGestureRecognizer *pan; | |
| - (void)attachToViewController:(UIViewController *)viewController withView:(UIView *)view presentViewController:(UIViewController *)presentViewController; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "MiniToLargeViewInteractive.h" | |
| @interface MiniToLargeViewInteractive () | |
| @property (nonatomic) BOOL shouldComplete; | |
| @end | |
| @implementation MiniToLargeViewInteractive |