├── HYBControllerTransitions.podspec ├── HYBControllerTransitions ├── HYBBaseTransition.h ├── HYBBaseTransition.m ├── HYBBubbleTransition.h ├── HYBBubbleTransition.m ├── HYBEaseInOutTransition.h ├── HYBEaseInOutTransition.m ├── HYBModalTransition.h ├── HYBModalTransition.m ├── HYBMoveTransition.h ├── HYBMoveTransition.m ├── UIViewController+HYBMoveTransition.h └── UIViewController+HYBMoveTransition.m ├── HYBTransitionAnimations.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── huangyibiao.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── huangyibiao.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── HYBTransitionAnimations.xcscheme │ └── xcschememanagement.plist ├── HYBTransitionAnimations ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── HYBBaseViewController.h ├── HYBBaseViewController.m ├── HYBBubbleFromBottomController.h ├── HYBBubbleFromBottomController.m ├── HYBBubbleRightViewController.h ├── HYBBubbleRightViewController.m ├── HYBEaseInOutController.h ├── HYBEaseInOutController.m ├── HYBEaseInOutDetailController.h ├── HYBEaseInOutDetailController.m ├── HYBGridCell.h ├── HYBGridCell.m ├── HYBGridModel.h ├── HYBGridModel.m ├── HYBModalBubbleTopRightViewController.h ├── HYBModalBubbleTopRightViewController.m ├── HYBModalBubbleViewController.h ├── HYBModalBubbleViewController.m ├── HYBModalHalfController.h ├── HYBModalHalfController.m ├── HYBModalHalfDetailController.h ├── HYBModalHalfDetailController.m ├── HYBMoveDetailController.h ├── HYBMoveDetailController.m ├── HYBMoveViewController.h ├── HYBMoveViewController.m ├── Info.plist ├── ViewController.h ├── ViewController.m ├── images │ ├── img1.jpg │ ├── img10.jpg │ ├── img11.jpg │ ├── img12.jpg │ ├── img2.jpg │ ├── img3.jpg │ ├── img4.jpg │ ├── img5.jpg │ ├── img6.jpg │ ├── img7.jpg │ ├── img8.jpg │ └── img9.jpg └── main.m ├── HYBTransitionAnimationsTests ├── HYBTransitionAnimationsTests.m └── Info.plist ├── LICENSE ├── README.md ├── biaologo.png ├── bubble.gif ├── logo.png ├── modal.gif └── move.gif /HYBControllerTransitions.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "HYBControllerTransitions" 3 | s.version = "1.2.0" 4 | s.summary = "A very useful and helpful controller transition library.Custom push, pop, dismiss, and present transition. Just an API for calling it." 5 | s.description = <<-DESC 6 | This is an open source library for developers to use custom transition, including push, pop, present and dismiss. In the library, now has supported many kind of animations that we can see in many apps. The best thing for this library is, that developers only need to call an API, without others, to support custom transition. For more information, just see the document in detail or just download the demo project to have a look. 7 | This is an open source library for developers to use custom transition, including push, pop, present and dismiss. In the library, now has supported many kind of animations that we can see in many apps. The best thing for this library is, that developers only need to call an API, without others, to support custom transition. For more information, just see the document in detail or just download the demo project to have a look. 8 | DESC 9 | 10 | s.homepage = "https://github.com/CoderJackyHuang/HYBControllerTransitions" 11 | s.screenshots = "http://www.henishuo.com/wp-content/uploads/2016/03/bubble.gif", "http://www.henishuo.com/wp-content/uploads/2016/03/modal.gif", "http://www.henishuo.com/wp-content/uploads/2016/03/move.gif" 12 | s.license = "MIT" 13 | s.author = { "huangyibiao" => "" } 14 | s.social_media_url = "http://henishuo.com" 15 | s.platform = :ios, "7.0" 16 | s.source = { :git => "https://github.com/CoderJackyHuang/HYBControllerTransitions.git", :tag => "#{s.version}" } 17 | s.source_files = "HYBControllerTransitions", "*.{h,m}" 18 | 19 | end 20 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBBaseTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBaseTransitionAnimation.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /** 13 | * GITHUB : https://github.com/CoderJackyHuang/HYBControllerTransitions 14 | * Chinese Document : http://www.henishuo.com/transition-chinese-document/ 15 | * Author Blog : http://www.henishuo.com/ 16 | * Email : huangyibiao520@163.com 17 | * 18 | * Please give me a feed back when there is something wrong, or you need a special effec. 19 | */ 20 | 21 | 22 | @class HYBBaseTransition; 23 | 24 | /** 25 | * @author huangyibiao 26 | * 27 | * The block version of protocol, just see: 28 | * 29 | * - (id)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source 30 | * 31 | * @param presented The controller will be presented 32 | * @param presenting The controller to present the presented controller 33 | * @param source The source controller 34 | * @param transition The object which implement UIViewControllerTransitioningDelegate protocol. 35 | * Just strongly cast it to the subclass type which was called. 36 | * 37 | * @Note For more information, @see UIViewControllerTransitioningDelegate 38 | */ 39 | typedef void(^HYBTransitionPresented)(UIViewController *presented, 40 | UIViewController *presenting, 41 | UIViewController *source, 42 | HYBBaseTransition *transition); 43 | 44 | /** 45 | * @author huangyibiao 46 | * 47 | * The block version of protocol, just see: 48 | * 49 | * - (nullable id )animationControllerForDismissedController:(UIViewController *)dismissed; 50 | * 51 | * @param dismissed The controller will be dismissed. 52 | * @param transition The object which implement UIViewControllerTransitioningDelegate protocol. 53 | * If you want to change, you can configure it. Usually, you don't need to 54 | * config anything, and it will works well. Cast it to the real subclass type. 55 | * 56 | * @Note For more information, @see UIViewControllerTransitioningDelegate 57 | */ 58 | typedef void(^HYBTransitionDismiss)(UIViewController *dismissed, HYBBaseTransition *transition); 59 | 60 | /** 61 | * @author huangyibiao 62 | * 63 | * The call back for custom push transition animation. 64 | * 65 | * @param fromVC Push from view controller 66 | * @param toVC Push to view controller 67 | * @param transition The object which implement UINavigationControllerDelegate for push/pop. 68 | * If you want to change, you can configure it. Usually, you don't need to 69 | * config anything, and it will works well. Cast it to the real subclass type. 70 | * 71 | * @Note see UINavigationControllerDelegate 72 | */ 73 | typedef void(^HYBTransitionPush)(UIViewController *fromVC, 74 | UIViewController *toVC, 75 | HYBBaseTransition *transition); 76 | // The same to the push 77 | typedef HYBTransitionPush HYBTransitionPop; 78 | 79 | /** 80 | * The transition mode. It's double pairs of mode. 81 | */ 82 | typedef NS_ENUM(NSUInteger, HYBTransitionMode) { 83 | kHYBTransitionDismiss, // Dismiss 84 | kHYBTransitionPresent, // Present 85 | kHYBTransitionPush, // Push 86 | kHYBTransitionPop // Pop 87 | }; 88 | 89 | /** 90 | * @author huangyibiao 91 | * 92 | * Base class for transition animation. 93 | */ 94 | @interface HYBBaseTransition : NSObject < 95 | UIViewControllerAnimatedTransitioning, // This is the required protocol. 96 | UIViewControllerTransitioningDelegate, // for present and dismiss transition 97 | UINavigationControllerDelegate // For push and pop transition 98 | > 99 | 100 | /** 101 | * The duration of transition animations, for pairs of present/dissmis 102 | * or push/pop. Default is 0.5s. 103 | */ 104 | @property (nonatomic, assign) NSTimeInterval duration; 105 | 106 | /** 107 | * The transition mode, Only `Dismiss`、`Present`、`Push`、`Pop`. 108 | * Default is `kHYBTransitionPush` 109 | * 110 | * @see For more information, just see HYBTransitionMode. 111 | */ 112 | @property (nonatomic, assign) HYBTransitionMode transitionMode; 113 | 114 | /** 115 | * The subclass can use it directly. 116 | * When presented, it will be invoked if it exsists. 117 | */ 118 | @property (nonatomic, copy) HYBTransitionPresented animationPresentedCallback; 119 | 120 | /** 121 | * The subclass can use it directly. 122 | * When dismissed, it will be invoked if it exsists. 123 | */ 124 | @property (nonatomic, copy) HYBTransitionDismiss animationDismissCallback; 125 | 126 | /** 127 | * The subclass can use it directly. 128 | * When pushed, it will be invoked if it exsists. 129 | */ 130 | @property (nonatomic, copy) HYBTransitionPush animationPushedCallback; 131 | 132 | /** 133 | * The subclass can use it directly. 134 | * When poped, it will be invoked if it exsists. 135 | */ 136 | @property (nonatomic, copy) HYBTransitionPop animationPopedCallback; 137 | 138 | /** 139 | * Default is NO, if set to YES, it will be presented and dismissed with 140 | * spring animation. 141 | */ 142 | @property (nonatomic, assign) BOOL animatedWithSpring; 143 | 144 | /** 145 | * The initial Spring velocity, Only when animatedWithSpring is YES, it will take effect. 146 | * Default is 1.0 / 0.5. If you don't know, just use the default value. 147 | */ 148 | @property (nonatomic, assign) CGFloat initialSpringVelocity; 149 | 150 | /** 151 | * The Spring damp, Only when animatedWithSpring is YES, it will take effect. 152 | * 153 | * Default is 0.5. If you don't know, just use the default value. 154 | */ 155 | @property (nonatomic, assign) CGFloat damp; 156 | 157 | /** 158 | * The designed-initializer for present/dismiss. Subclass can override it to initialize something. 159 | * Call it to create bubble transition object, with double callbacks. 160 | * 161 | * @param presentedCallback When presented, it will be invoked. 162 | * @param dismissCallback When dissmissed, it will be invoked. 163 | * 164 | * @return The transition object, usually it is no use. If you really need it to 165 | * Do something, you can own it strongly. 166 | */ 167 | - (instancetype)initWithPresented:(HYBTransitionPresented)presentedCallback 168 | dismissed:(HYBTransitionDismiss)dismissCallback; 169 | 170 | /** 171 | * The designed-initializer for push/pop. Subclass can override it to initialize something. 172 | * Call it to create bubble transition object, with double callbacks. 173 | 174 | * 175 | * @param pushCallback When pushed, it will be invoked. 176 | * @param popCallback When poped, it will be invoked. 177 | * 178 | * @return The transition object, usually it is no use. If you really need it to 179 | * Do something, you can own it strongly. 180 | */ 181 | - (instancetype)initWithPushed:(HYBTransitionPush)pushCallback 182 | poped:(HYBTransitionPop)popCallback; 183 | 184 | - (UIView *)toView:(id)transitionContext ; 185 | - (UIView *)fromView:(id)transitionContext ; 186 | 187 | @end 188 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBBaseTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBaseTransitionAnimation.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseTransition.h" 10 | 11 | @implementation HYBBaseTransition 12 | 13 | - (instancetype)init { 14 | if (self = [super init]) { 15 | self.duration = 0.5; 16 | self.transitionMode = kHYBTransitionPush; 17 | self.damp = 0.5; 18 | self.initialSpringVelocity = 1.0 / 0.5; 19 | self.animatedWithSpring = NO; 20 | } 21 | 22 | return self; 23 | } 24 | 25 | - (instancetype)initWithPresented:(HYBTransitionPresented)presentedCallback 26 | dismissed:(HYBTransitionDismiss)dismissCallback { 27 | if (self = [self init]) { 28 | self.animationDismissCallback = dismissCallback; 29 | self.animationPresentedCallback = presentedCallback; 30 | } 31 | 32 | return self; 33 | } 34 | 35 | - (instancetype)initWithPushed:(HYBTransitionPush)pushCallback 36 | poped:(HYBTransitionPop)popCallback { 37 | if (self = [self init]) { 38 | self.animationPopedCallback = popCallback; 39 | self.animationPushedCallback = pushCallback; 40 | } 41 | 42 | return self; 43 | } 44 | 45 | #pragma mark - UIViewControllerAnimatedTransitioning 46 | 47 | // Required by UIViewControllerAnimatedTransitioning protocol 48 | // You can override it if you must. Usually normally you don't need to override it, 49 | // just set ther property duration and it will works well. 50 | - (NSTimeInterval)transitionDuration:(id)transitionContext { 51 | return self.duration; 52 | } 53 | 54 | // Required by UIViewControllerAnimatedTransitioning protocol. 55 | // Subclass must override it to add animation for controller. 56 | - (void)animateTransition:(id)transitionContext { 57 | #ifdef DEBUG 58 | NSLog(@"Subclass must override it if you want to make it works well."); 59 | #endif 60 | } 61 | 62 | // Usually you don't need to override it. 63 | // Unless that you need to do something after animation is finished. 64 | - (void)animationEnded:(BOOL)transitionCompleted { 65 | // Now just do nothing. 66 | } 67 | 68 | #pragma mark - UIViewControllerTransitioningDelegate 69 | - (id)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { 70 | self.transitionMode = kHYBTransitionPresent; 71 | 72 | if (self.animationPresentedCallback) { 73 | self.animationPresentedCallback(presented, presenting, source, self); 74 | } 75 | 76 | return self; 77 | } 78 | 79 | - (id)animationControllerForDismissedController:(UIViewController *)dismissed { 80 | self.transitionMode = kHYBTransitionDismiss; 81 | 82 | if (self.animationDismissCallback) { 83 | self.animationDismissCallback(dismissed, self); 84 | } 85 | 86 | return self; 87 | } 88 | 89 | #pragma mark - UINavigationControllerDelegate 90 | - (id)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC { 91 | 92 | if (UINavigationControllerOperationPush == operation) { 93 | self.transitionMode = kHYBTransitionPush; 94 | 95 | if (self.animationPushedCallback) { 96 | self.animationPushedCallback(fromVC, toVC, self); 97 | } 98 | } else if (operation == UINavigationControllerOperationPop) { 99 | self.transitionMode = kHYBTransitionPop; 100 | 101 | toVC.navigationController.delegate = nil; 102 | 103 | if (self.animationPopedCallback) { 104 | self.animationPopedCallback(fromVC, toVC, self); 105 | } 106 | } 107 | 108 | return self; 109 | } 110 | 111 | - (UIView *)toView:(id)transitionContext { 112 | UIView *toView = nil; 113 | 114 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 115 | 116 | if ([transitionContext respondsToSelector:@selector(viewForKey:)]) { 117 | toView = [transitionContext viewForKey:UITransitionContextToViewKey]; 118 | } else { 119 | toView = toVC.view; 120 | } 121 | 122 | toView.frame = [transitionContext finalFrameForViewController:toVC]; 123 | 124 | return toView; 125 | } 126 | 127 | - (UIView *)fromView:(id)transitionContext { 128 | 129 | UIView *fromView = nil; 130 | 131 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 132 | 133 | if ([transitionContext respondsToSelector:@selector(viewForKey:)]) { 134 | fromView = [transitionContext viewForKey:UITransitionContextFromViewKey]; 135 | } else { 136 | fromView = fromVC.view; 137 | } 138 | 139 | fromView.frame = [transitionContext initialFrameForViewController:fromVC]; 140 | 141 | return fromView; 142 | } 143 | 144 | 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBBubbleTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBubbleTransitionAnimation.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseTransition.h" 10 | 11 | 12 | /** 13 | * GITHUB : https://github.com/CoderJackyHuang/HYBControllerTransitions 14 | * Chinese Document : http://www.henishuo.com/transition-chinese-document/ 15 | * Author Blog : http://www.henishuo.com/ 16 | * Email : huangyibiao520@163.com 17 | * 18 | * Please give me a feed back when there is something wrong, or you need a special effec. 19 | * 20 | * A custom modal transition that presents and dismiss a controller 21 | * with an expanding bubble effect. 22 | * 23 | * @Note The bubble transition only supports present and dismiis mode. 24 | */ 25 | @interface HYBBubbleTransition : HYBBaseTransition 26 | 27 | /** 28 | * The color of the bubble. It should be the destination controller's 29 | * background color, so that it could look much better. 30 | */ 31 | @property (nonatomic, strong) UIColor *bubbleColor; 32 | 33 | /** 34 | * The start point for the beginning of a bubble and it will shrink 35 | * to this point when dismiss. 36 | * 37 | * Default value is {toView.size.width / 2, toView.size.height} 38 | * 39 | * Though here supports default value, you should set a starting point 40 | * so that it can bubble from your settring point. 41 | */ 42 | @property (nonatomic, assign) CGPoint bubbleStartPoint; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBBubbleTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBubbleTransitionAnimation.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBubbleTransition.h" 10 | 11 | @interface HYBBubbleTransition () 12 | 13 | @property (nonatomic, strong) UIView *bubbleView; 14 | 15 | @end 16 | 17 | @implementation HYBBubbleTransition 18 | 19 | - (instancetype)initWithPresented:(HYBTransitionPresented)presentedCallback 20 | dismissed:(HYBTransitionDismiss)dismissCallback { 21 | if (self = [super initWithPresented:presentedCallback dismissed:dismissCallback]) { 22 | self.bubbleStartPoint = (CGPoint){NSNotFound, NSNotFound}; 23 | } 24 | 25 | return self; 26 | } 27 | 28 | #pragma mark - UIViewControllerContextTransitioning 29 | - (void)animateTransition:(id)transitionContext { 30 | UIView *containerView = [transitionContext containerView]; 31 | 32 | if (containerView == nil) { 33 | return; 34 | } 35 | 36 | if (self.transitionMode == kHYBTransitionPresent) { 37 | UIView *toView = [self toView:transitionContext]; 38 | CGPoint toViewDestinationCenter = toView.center; 39 | CGSize toViewDestionationSize = toView.frame.size; 40 | 41 | CGPoint startPoint = self.bubbleStartPoint; 42 | if ([self shouldUseDefaultStartingPoint]) { 43 | startPoint = (CGPoint){toView.frame.size.width / 2, toView.frame.size.height}; 44 | } 45 | 46 | self.bubbleView = [[UIView alloc] init]; 47 | self.bubbleView.backgroundColor = self.bubbleColor; 48 | self.bubbleView.frame = [self bubbleFrameWithDestinationSize:toViewDestionationSize]; 49 | self.bubbleView.layer.cornerRadius = self.bubbleView.frame.size.height / 2; 50 | self.bubbleView.transform = CGAffineTransformMakeScale(0.001, 0.001); 51 | self.bubbleView.center = startPoint; 52 | [containerView addSubview:self.bubbleView]; 53 | 54 | toView.transform = CGAffineTransformMakeScale(0.001, 0.001); 55 | toView.center = startPoint; 56 | toView.alpha = 0.0; 57 | 58 | [containerView addSubview:toView]; 59 | 60 | 61 | if (self.animatedWithSpring) { 62 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:UIViewAnimationOptionCurveEaseInOut animations:^{ 63 | self.bubbleView.transform = CGAffineTransformIdentity; 64 | toView.transform = CGAffineTransformIdentity; 65 | toView.alpha = 1.0; 66 | toView.center = toViewDestinationCenter; 67 | } completion:^(BOOL finished) { 68 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 69 | }]; 70 | } else { 71 | [UIView animateWithDuration:self.duration animations:^{ 72 | self.bubbleView.transform = CGAffineTransformIdentity; 73 | toView.transform = CGAffineTransformIdentity; 74 | toView.alpha = 1.0; 75 | toView.center = toViewDestinationCenter; 76 | } completion:^(BOOL finished) { 77 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 78 | }]; 79 | } 80 | } else if (self.transitionMode == kHYBTransitionDismiss) { 81 | UIView *fromView = [self fromView:transitionContext]; 82 | CGSize fromViewSize = fromView.frame.size; 83 | CGPoint fromViewCenter = fromView.center; 84 | 85 | CGPoint startPoint = self.bubbleStartPoint; 86 | if ([self shouldUseDefaultStartingPoint]) { 87 | startPoint = (CGPoint){fromView.frame.size.width / 2, fromView.frame.size.height}; 88 | } 89 | 90 | self.bubbleView.frame = [self bubbleFrameWithDestinationSize:fromViewSize]; 91 | self.bubbleView.layer.cornerRadius = self.bubbleView.frame.size.height / 2; 92 | self.bubbleView.center = startPoint; 93 | 94 | if (self.animatedWithSpring) { 95 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:UIViewAnimationOptionCurveEaseInOut animations:^{ 96 | self.bubbleView.transform = CGAffineTransformMakeScale(0.001, 0.001); 97 | fromView.transform = CGAffineTransformMakeScale(0.001, 0.001); 98 | fromView.alpha = 0.0; 99 | fromView.center = startPoint; 100 | } completion:^(BOOL finished) { 101 | fromView.center = fromViewCenter; 102 | [fromView removeFromSuperview]; 103 | [self.bubbleView removeFromSuperview]; 104 | 105 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 106 | }]; 107 | } else { 108 | [UIView animateWithDuration:self.duration animations:^{ 109 | self.bubbleView.transform = CGAffineTransformMakeScale(0.001, 0.001); 110 | fromView.transform = CGAffineTransformMakeScale(0.001, 0.001); 111 | fromView.alpha = 0.0; 112 | fromView.center = startPoint; 113 | } completion:^(BOOL finished) { 114 | fromView.center = fromViewCenter; 115 | [fromView removeFromSuperview]; 116 | [self.bubbleView removeFromSuperview]; 117 | 118 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 119 | }]; 120 | } 121 | } else { 122 | NSLog(@"Only support kHYBTransitionDismiss and kHYBTransitionPresent mode."); 123 | } 124 | } 125 | 126 | #pragma mark - Private 127 | - (CGRect)bubbleFrameWithDestinationSize:(CGSize)destinationSize { 128 | CGFloat x = fmax(self.bubbleStartPoint.x, destinationSize.width - self.bubbleStartPoint.x); 129 | CGFloat y = fmax(self.bubbleStartPoint.y, destinationSize.height - self.bubbleStartPoint.y); 130 | CGFloat radius = sqrt(x * x + y * y); 131 | CGFloat diameter = radius * 2; 132 | 133 | return (CGRect){0, 0, diameter, diameter}; 134 | } 135 | 136 | - (BOOL)shouldUseDefaultStartingPoint { 137 | return CGPointEqualToPoint(_bubbleStartPoint, (CGPoint){NSNotFound, NSNotFound}); 138 | } 139 | 140 | 141 | 142 | @end 143 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBEaseInOutTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBEaseInOutTransition.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/4/6. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseTransition.h" 10 | 11 | @interface HYBEaseInOutTransition : HYBBaseTransition 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBEaseInOutTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBEaseInOutTransition.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/4/6. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBEaseInOutTransition.h" 10 | 11 | @implementation HYBEaseInOutTransition 12 | 13 | - (void)animateTransition:(id)transitionContext { 14 | UIView *containerView = [transitionContext containerView]; 15 | 16 | if (containerView == nil) { 17 | return; 18 | } 19 | 20 | UIView *fromView = [self fromView:transitionContext]; 21 | UIView *toView = [self toView:transitionContext]; 22 | 23 | [containerView addSubview:toView]; 24 | 25 | toView.alpha = 0.0; 26 | fromView.alpha = 1.0; 27 | 28 | if (self.animatedWithSpring == NO) { 29 | [UIView animateWithDuration:self.duration animations:^{ 30 | fromView.alpha = 0.0; 31 | toView.alpha = 1.0; 32 | } completion:^(BOOL finished) { 33 | 34 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 35 | }]; 36 | } else { 37 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:UIViewAnimationOptionCurveEaseInOut animations:^{ 38 | fromView.alpha = 0.0; 39 | toView.alpha = 1.0; 40 | } completion:^(BOOL finished) { 41 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 42 | }]; 43 | } 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBModalTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalTransition.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseTransition.h" 10 | 11 | /** 12 | * GITHUB : https://github.com/CoderJackyHuang/HYBControllerTransitions 13 | * Chinese Document : http://www.henishuo.com/transition-chinese-document/ 14 | * Author Blog : http://www.henishuo.com/ 15 | * Email : huangyibiao520@163.com 16 | * 17 | * Please give me a feed back when there is something wrong, or you need a special effec. 18 | * 19 | * Modal transition animation, it will show usually half for the 20 | * destination view controller's view, and scale the from view. 21 | * 22 | * @Note It only supports present and dismiss mode. 23 | */ 24 | @interface HYBModalTransition : HYBBaseTransition 25 | 26 | /** 27 | * Make the from view scale to the specified scale. 28 | * 29 | * Default is (0.9, 0.9) 30 | */ 31 | @property (nonatomic, assign) CGPoint scale; 32 | 33 | /** 34 | * The height for destination view to present. 35 | * 36 | * Default is half of destination view, it means desView.frame.size.height / 2 37 | */ 38 | @property (nonatomic, assign) CGFloat presentedHeight; 39 | 40 | /** 41 | * Whether to include navigation bar when take snapshots. 42 | * Default is YES. If NO, it has only the presenting view. 43 | */ 44 | @property (nonatomic, assign) BOOL scapshotIncludingNavigationBar; 45 | 46 | /** 47 | * When tap on the presenting view, should it automatically is dismissed. 48 | * 49 | * Default is YES. 50 | */ 51 | @property (nonatomic, assign) BOOL shouldDismissOnTap; 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBModalTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalTransition.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBModalTransition.h" 10 | 11 | @interface HYBModalTransition () 12 | 13 | @property (nonatomic, weak) UIViewController *fromViewController; 14 | 15 | @end 16 | 17 | @implementation HYBModalTransition 18 | 19 | - (instancetype)initWithPresented:(HYBTransitionPresented)presentedCallback 20 | dismissed:(HYBTransitionDismiss)dismissCallback { 21 | if (self = [super initWithPresented:presentedCallback dismissed:dismissCallback]) { 22 | self.presentedHeight = NSNotFound; 23 | self.shouldDismissOnTap = YES; 24 | self.scale = CGPointMake(0.9, 0.9); 25 | self.scapshotIncludingNavigationBar = YES; 26 | } 27 | 28 | return self; 29 | } 30 | 31 | - (void)animateTransition:(id)transitionContext { 32 | UIView *containerView = [transitionContext containerView]; 33 | 34 | if (containerView == nil) { 35 | return; 36 | } 37 | 38 | if (self.transitionMode == kHYBTransitionPresent) { 39 | UIView *fromView = [self fromView:transitionContext]; 40 | UIView *toView = [self toView:transitionContext]; 41 | 42 | CGFloat height = self.presentedHeight; 43 | if ([self shouldUseDefaultHeight]) { 44 | height = toView.frame.size.height / 2; 45 | } 46 | 47 | self.presentedHeight = height; 48 | 49 | UIView *fromTempView = nil; 50 | if (self.scapshotIncludingNavigationBar) { 51 | fromTempView = [[UIScreen mainScreen] snapshotViewAfterScreenUpdates:NO]; 52 | } else { 53 | fromTempView = [fromView snapshotViewAfterScreenUpdates:NO]; 54 | } 55 | 56 | fromTempView.frame = fromView.frame; 57 | [containerView addSubview:fromTempView]; 58 | 59 | if (self.shouldDismissOnTap) { 60 | self.fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 61 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] 62 | initWithTarget:self 63 | action:@selector(onTapToDismiss)]; 64 | fromTempView.userInteractionEnabled = YES; 65 | [fromTempView addGestureRecognizer:tap]; 66 | } 67 | 68 | fromView.alpha = 0.0; 69 | 70 | toView.frame = CGRectMake(toView.frame.origin.x, 71 | containerView.frame.size.height, 72 | toView.frame.size.width, 73 | height); 74 | [containerView addSubview:toView]; 75 | 76 | if (self.animatedWithSpring == NO) { 77 | [UIView animateWithDuration:self.duration animations:^{ 78 | toView.transform = CGAffineTransformMakeTranslation(0, -height); 79 | fromTempView.transform = CGAffineTransformMakeScale(self.scale.x, self.scale.y); 80 | } completion:^(BOOL finished) { 81 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 82 | }]; 83 | } else { 84 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:UIViewAnimationOptionCurveEaseInOut animations:^{ 85 | toView.transform = CGAffineTransformMakeTranslation(0, -height); 86 | fromTempView.transform = CGAffineTransformMakeScale(self.scale.x, self.scale.y); 87 | } completion:^(BOOL finished) { 88 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 89 | }]; 90 | } 91 | } else if (self.transitionMode == kHYBTransitionDismiss) { 92 | UIView *toView = [self toView:transitionContext]; 93 | 94 | UIView *fromTempView = [containerView.subviews firstObject]; 95 | UIView *currentPresentingView = [containerView.subviews lastObject]; 96 | 97 | if (![self animatedWithSpring]) { 98 | [UIView animateWithDuration:self.duration animations:^{ 99 | fromTempView.transform = CGAffineTransformIdentity; 100 | currentPresentingView.transform = CGAffineTransformIdentity; 101 | } completion:^(BOOL finished) { 102 | toView.alpha = 1.0; 103 | [fromTempView removeFromSuperview]; 104 | 105 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 106 | }]; 107 | } else { 108 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:UIViewAnimationOptionCurveEaseInOut animations:^{ 109 | fromTempView.transform = CGAffineTransformIdentity; 110 | currentPresentingView.transform = CGAffineTransformIdentity; 111 | } completion:^(BOOL finished) { 112 | toView.alpha = 1.0; 113 | [fromTempView removeFromSuperview]; 114 | 115 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 116 | }]; 117 | } 118 | } else { 119 | NSLog(@"Only support kHYBTransitionDismiss and kHYBTransitionPresent mode."); 120 | } 121 | } 122 | 123 | 124 | - (BOOL)shouldUseDefaultHeight { 125 | return self.presentedHeight == NSNotFound; 126 | } 127 | 128 | - (void)onTapToDismiss { 129 | [self.fromViewController dismissViewControllerAnimated:YES completion:NULL]; 130 | } 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBMoveTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMoveTransition.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseTransition.h" 10 | #import "UIViewController+HYBMoveTransition.h" 11 | 12 | 13 | /** 14 | * GITHUB : https://github.com/CoderJackyHuang/HYBControllerTransitions 15 | * Chinese Document : http://www.henishuo.com/transition-chinese-document/ 16 | * Author Blog : http://www.henishuo.com/ 17 | * Email : huangyibiao520@163.com 18 | * 19 | * Please give me a feed back when there is something wrong, or you need a special effec. 20 | * 21 | * The move transition animation, it looks like the transition animation 22 | * of KeyNote move transition. 23 | * 24 | * When click a cell or a subview, then push to a view controller and you need 25 | * animation from the clicked view to the destination controller. 26 | * 27 | * @Note It only supports push and pop mode. 28 | */ 29 | @interface HYBMoveTransition : HYBBaseTransition 30 | 31 | /** 32 | * The view that is clicked at the pushing view controller. 33 | */ 34 | @property (nonatomic, strong, nonnull) UIView *targetClickedView; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /HYBControllerTransitions/HYBMoveTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMoveTransition.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBMoveTransition.h" 10 | 11 | @implementation HYBMoveTransition 12 | 13 | 14 | - (void)animateTransition:(id)transitionContext { 15 | UIView *containerView = [transitionContext containerView]; 16 | 17 | if (containerView == nil) { 18 | return; 19 | } 20 | 21 | if (self.targetClickedView == nil) { 22 | NSLog(@"targetClickedView property can't be nil."); 23 | return; 24 | } 25 | 26 | if (self.transitionMode == kHYBTransitionPush) { 27 | UIView *toView = [self toView:transitionContext]; 28 | UIView *tempView = [self.targetClickedView snapshotViewAfterScreenUpdates:NO]; 29 | 30 | tempView.frame = [self.targetClickedView convertRect:self.targetClickedView.bounds 31 | toView:containerView]; 32 | 33 | [containerView addSubview:toView]; 34 | [containerView addSubview:tempView]; 35 | 36 | toView.alpha = 1.0; 37 | self.targetClickedView.alpha = 0.0; 38 | 39 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 40 | toVC.hyb_toTargetView.alpha = 0.0; 41 | CGRect targetRect = [toVC.hyb_toTargetView convertRect:toVC.hyb_toTargetView.bounds 42 | toView:containerView]; 43 | if (self.animatedWithSpring) { 44 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:0 animations:^{ 45 | tempView.frame = targetRect; 46 | } completion:^(BOOL finished) { 47 | toView.alpha = 1.0; 48 | tempView.alpha = 0.0; 49 | toVC.hyb_toTargetView.alpha = 1.0; 50 | 51 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 52 | }]; 53 | } else { 54 | [UIView animateWithDuration:self.duration animations:^{ 55 | tempView.frame = targetRect; 56 | } completion:^(BOOL finished) { 57 | toView.alpha = 1.0; 58 | tempView.alpha = 0.0; 59 | toVC.hyb_toTargetView.alpha = 1.0; 60 | 61 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 62 | }]; 63 | } 64 | } else if (self.transitionMode == kHYBTransitionPop) { 65 | UIView *toView = [self toView:transitionContext]; 66 | UIView *fromView = [self fromView:transitionContext]; 67 | UIView *tempView = [containerView.subviews lastObject]; 68 | 69 | toView.alpha = 1.0; 70 | fromView.alpha = 1.0; 71 | tempView.alpha = 1.0; 72 | 73 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 74 | fromVC.hyb_toTargetView.alpha = 0.0; 75 | 76 | [containerView addSubview:toView]; 77 | [containerView bringSubviewToFront:tempView]; 78 | 79 | CGRect originalRect = [self.targetClickedView convertRect:self.targetClickedView.bounds 80 | toView:containerView]; 81 | 82 | if (self.animatedWithSpring) { 83 | [UIView animateWithDuration:self.duration delay:0 usingSpringWithDamping:self.damp initialSpringVelocity:self.initialSpringVelocity options:0 animations:^{ 84 | tempView.frame = originalRect; 85 | } completion:^(BOOL finished) { 86 | toView.alpha = 1.0; 87 | tempView.alpha = 0.0; 88 | [tempView removeFromSuperview]; 89 | self.targetClickedView.alpha = 1.0; 90 | 91 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 92 | }]; 93 | } else { 94 | [UIView animateWithDuration:self.duration animations:^{ 95 | tempView.frame = originalRect; 96 | } completion:^(BOOL finished) { 97 | toView.alpha = 1.0; 98 | tempView.alpha = 0.0; 99 | [tempView removeFromSuperview]; 100 | self.targetClickedView.alpha = 1.0; 101 | 102 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 103 | }]; 104 | } 105 | } else { 106 | NSLog(@"Only support kHYBTransitionPush and kHYBTransitionPop mode."); 107 | } 108 | } 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /HYBControllerTransitions/UIViewController+HYBMoveTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+HYBMoveTransition.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | /** 13 | * GITHUB : https://github.com/CoderJackyHuang/HYBControllerTransitions 14 | * Chinese Document : http://www.henishuo.com/transition-chinese-document/ 15 | * Author Blog : http://www.henishuo.com/ 16 | * Email : huangyibiao520@163.com 17 | * 18 | * Please give me a feed back when there is something wrong, or you need a special effec. 19 | * 20 | * A category of UIViewController, for setting a target view, 21 | * so that it can handle to transition to which view. 22 | */ 23 | @interface UIViewController (HYBMoveTransition) 24 | 25 | /** 26 | * Set a target view to show. When push, it will transition to 27 | * the target view. and when poped, it will pop from the target view. 28 | */ 29 | @property (nonatomic, strong, nonnull) UIView *hyb_toTargetView; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /HYBControllerTransitions/UIViewController+HYBMoveTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+HYBMoveTransition.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+HYBMoveTransition.h" 10 | #import 11 | 12 | static const void *s_hyb_move_transition_targetview_key = "s_hyb_move_transition_targetview_key"; 13 | 14 | @implementation UIViewController (HYBMoveTransition) 15 | 16 | - (UIView *)hyb_toTargetView { 17 | return objc_getAssociatedObject(self, s_hyb_move_transition_targetview_key); 18 | } 19 | 20 | - (void)setHyb_toTargetView:(UIView *)hyb_toTargetView { 21 | objc_setAssociatedObject(self, 22 | s_hyb_move_transition_targetview_key, 23 | hyb_toTargetView, 24 | OBJC_ASSOCIATION_RETAIN_NONATOMIC); 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /HYBTransitionAnimations.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 690CA5BF1CABD22300E2F50B /* HYBBaseTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5B61CABD22300E2F50B /* HYBBaseTransition.m */; }; 11 | 690CA5C01CABD22300E2F50B /* HYBBaseTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5B61CABD22300E2F50B /* HYBBaseTransition.m */; }; 12 | 690CA5C11CABD22300E2F50B /* HYBBubbleTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5B81CABD22300E2F50B /* HYBBubbleTransition.m */; }; 13 | 690CA5C21CABD22300E2F50B /* HYBBubbleTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5B81CABD22300E2F50B /* HYBBubbleTransition.m */; }; 14 | 690CA5C31CABD22300E2F50B /* HYBModalTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5BA1CABD22300E2F50B /* HYBModalTransition.m */; }; 15 | 690CA5C41CABD22300E2F50B /* HYBModalTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5BA1CABD22300E2F50B /* HYBModalTransition.m */; }; 16 | 690CA5C51CABD22300E2F50B /* HYBMoveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5BC1CABD22300E2F50B /* HYBMoveTransition.m */; }; 17 | 690CA5C61CABD22300E2F50B /* HYBMoveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5BC1CABD22300E2F50B /* HYBMoveTransition.m */; }; 18 | 690CA5C71CABD22300E2F50B /* UIViewController+HYBMoveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5BE1CABD22300E2F50B /* UIViewController+HYBMoveTransition.m */; }; 19 | 690CA5C81CABD22300E2F50B /* UIViewController+HYBMoveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 690CA5BE1CABD22300E2F50B /* UIViewController+HYBMoveTransition.m */; }; 20 | 690FC9361CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9351CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m */; }; 21 | 690FC9371CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9351CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m */; }; 22 | 690FC93A1CAB68BC0002E6A9 /* HYBBubbleRightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9391CAB68BC0002E6A9 /* HYBBubbleRightViewController.m */; }; 23 | 690FC93B1CAB68BC0002E6A9 /* HYBBubbleRightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9391CAB68BC0002E6A9 /* HYBBubbleRightViewController.m */; }; 24 | 690FC9451CAB75B00002E6A9 /* HYBModalHalfController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9441CAB75B00002E6A9 /* HYBModalHalfController.m */; }; 25 | 690FC9461CAB75B00002E6A9 /* HYBModalHalfController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9441CAB75B00002E6A9 /* HYBModalHalfController.m */; }; 26 | 690FC9491CAB75C30002E6A9 /* HYBModalHalfDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9481CAB75C30002E6A9 /* HYBModalHalfDetailController.m */; }; 27 | 690FC94A1CAB75C30002E6A9 /* HYBModalHalfDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9481CAB75C30002E6A9 /* HYBModalHalfDetailController.m */; }; 28 | 690FC9581CAB76520002E6A9 /* img1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94C1CAB76520002E6A9 /* img1.jpg */; }; 29 | 690FC9591CAB76520002E6A9 /* img1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94C1CAB76520002E6A9 /* img1.jpg */; }; 30 | 690FC95A1CAB76520002E6A9 /* img10.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94D1CAB76520002E6A9 /* img10.jpg */; }; 31 | 690FC95B1CAB76520002E6A9 /* img10.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94D1CAB76520002E6A9 /* img10.jpg */; }; 32 | 690FC95C1CAB76520002E6A9 /* img11.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94E1CAB76520002E6A9 /* img11.jpg */; }; 33 | 690FC95D1CAB76520002E6A9 /* img11.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94E1CAB76520002E6A9 /* img11.jpg */; }; 34 | 690FC95E1CAB76520002E6A9 /* img12.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94F1CAB76520002E6A9 /* img12.jpg */; }; 35 | 690FC95F1CAB76520002E6A9 /* img12.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC94F1CAB76520002E6A9 /* img12.jpg */; }; 36 | 690FC9601CAB76520002E6A9 /* img2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9501CAB76520002E6A9 /* img2.jpg */; }; 37 | 690FC9611CAB76520002E6A9 /* img2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9501CAB76520002E6A9 /* img2.jpg */; }; 38 | 690FC9621CAB76520002E6A9 /* img3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9511CAB76520002E6A9 /* img3.jpg */; }; 39 | 690FC9631CAB76520002E6A9 /* img3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9511CAB76520002E6A9 /* img3.jpg */; }; 40 | 690FC9641CAB76520002E6A9 /* img4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9521CAB76520002E6A9 /* img4.jpg */; }; 41 | 690FC9651CAB76520002E6A9 /* img4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9521CAB76520002E6A9 /* img4.jpg */; }; 42 | 690FC9661CAB76520002E6A9 /* img5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9531CAB76520002E6A9 /* img5.jpg */; }; 43 | 690FC9671CAB76520002E6A9 /* img5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9531CAB76520002E6A9 /* img5.jpg */; }; 44 | 690FC9681CAB76520002E6A9 /* img6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9541CAB76520002E6A9 /* img6.jpg */; }; 45 | 690FC9691CAB76520002E6A9 /* img6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9541CAB76520002E6A9 /* img6.jpg */; }; 46 | 690FC96A1CAB76520002E6A9 /* img7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9551CAB76520002E6A9 /* img7.jpg */; }; 47 | 690FC96B1CAB76520002E6A9 /* img7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9551CAB76520002E6A9 /* img7.jpg */; }; 48 | 690FC96C1CAB76520002E6A9 /* img8.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9561CAB76520002E6A9 /* img8.jpg */; }; 49 | 690FC96D1CAB76520002E6A9 /* img8.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9561CAB76520002E6A9 /* img8.jpg */; }; 50 | 690FC96E1CAB76520002E6A9 /* img9.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9571CAB76520002E6A9 /* img9.jpg */; }; 51 | 690FC96F1CAB76520002E6A9 /* img9.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 690FC9571CAB76520002E6A9 /* img9.jpg */; }; 52 | 690FC97E1CAB9A0E0002E6A9 /* HYBMoveDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC97D1CAB9A0E0002E6A9 /* HYBMoveDetailController.m */; }; 53 | 690FC97F1CAB9A0E0002E6A9 /* HYBMoveDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC97D1CAB9A0E0002E6A9 /* HYBMoveDetailController.m */; }; 54 | 690FC9861CAB9A630002E6A9 /* HYBGridCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9811CAB9A630002E6A9 /* HYBGridCell.m */; }; 55 | 690FC9871CAB9A630002E6A9 /* HYBGridCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9811CAB9A630002E6A9 /* HYBGridCell.m */; }; 56 | 690FC9881CAB9A630002E6A9 /* HYBGridModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9831CAB9A630002E6A9 /* HYBGridModel.m */; }; 57 | 690FC9891CAB9A630002E6A9 /* HYBGridModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9831CAB9A630002E6A9 /* HYBGridModel.m */; }; 58 | 690FC98A1CAB9A630002E6A9 /* HYBMoveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9851CAB9A630002E6A9 /* HYBMoveViewController.m */; }; 59 | 690FC98B1CAB9A630002E6A9 /* HYBMoveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 690FC9851CAB9A630002E6A9 /* HYBMoveViewController.m */; }; 60 | 6929D40C1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 6929D40B1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m */; }; 61 | 6929D40D1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 6929D40B1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m */; }; 62 | 6929D4111CB4B4B30012A2CF /* HYBEaseInOutController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6929D4101CB4B4B30012A2CF /* HYBEaseInOutController.m */; }; 63 | 6929D4121CB4B4B30012A2CF /* HYBEaseInOutController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6929D4101CB4B4B30012A2CF /* HYBEaseInOutController.m */; }; 64 | 6929D4151CB4B4C50012A2CF /* HYBEaseInOutDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6929D4141CB4B4C50012A2CF /* HYBEaseInOutDetailController.m */; }; 65 | 6929D4161CB4B4C50012A2CF /* HYBEaseInOutDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6929D4141CB4B4C50012A2CF /* HYBEaseInOutDetailController.m */; }; 66 | 69406D451CAAB6BF00479B8A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D441CAAB6BF00479B8A /* main.m */; }; 67 | 69406D481CAAB6BF00479B8A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D471CAAB6BF00479B8A /* AppDelegate.m */; }; 68 | 69406D4B1CAAB6BF00479B8A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D4A1CAAB6BF00479B8A /* ViewController.m */; }; 69 | 69406D4E1CAAB6BF00479B8A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69406D4C1CAAB6BF00479B8A /* Main.storyboard */; }; 70 | 69406D501CAAB6BF00479B8A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 69406D4F1CAAB6BF00479B8A /* Assets.xcassets */; }; 71 | 69406D531CAAB6BF00479B8A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69406D511CAAB6BF00479B8A /* LaunchScreen.storyboard */; }; 72 | 69406D5E1CAAB6BF00479B8A /* HYBTransitionAnimationsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D5D1CAAB6BF00479B8A /* HYBTransitionAnimationsTests.m */; }; 73 | 69406D731CAAD38B00479B8A /* HYBModalBubbleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D721CAAD38B00479B8A /* HYBModalBubbleViewController.m */; }; 74 | 69406D741CAAD38B00479B8A /* HYBModalBubbleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D721CAAD38B00479B8A /* HYBModalBubbleViewController.m */; }; 75 | 69406D771CAAD49C00479B8A /* HYBBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D761CAAD49C00479B8A /* HYBBaseViewController.m */; }; 76 | 69406D781CAAD49C00479B8A /* HYBBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D761CAAD49C00479B8A /* HYBBaseViewController.m */; }; 77 | 69406D7D1CAAD55100479B8A /* HYBBubbleFromBottomController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D7C1CAAD55100479B8A /* HYBBubbleFromBottomController.m */; }; 78 | 69406D7E1CAAD55100479B8A /* HYBBubbleFromBottomController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69406D7C1CAAD55100479B8A /* HYBBubbleFromBottomController.m */; }; 79 | /* End PBXBuildFile section */ 80 | 81 | /* Begin PBXContainerItemProxy section */ 82 | 69406D5A1CAAB6BF00479B8A /* PBXContainerItemProxy */ = { 83 | isa = PBXContainerItemProxy; 84 | containerPortal = 69406D381CAAB6BF00479B8A /* Project object */; 85 | proxyType = 1; 86 | remoteGlobalIDString = 69406D3F1CAAB6BF00479B8A; 87 | remoteInfo = HYBTransitionAnimations; 88 | }; 89 | /* End PBXContainerItemProxy section */ 90 | 91 | /* Begin PBXFileReference section */ 92 | 690CA5B51CABD22300E2F50B /* HYBBaseTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBBaseTransition.h; sourceTree = ""; }; 93 | 690CA5B61CABD22300E2F50B /* HYBBaseTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBBaseTransition.m; sourceTree = ""; }; 94 | 690CA5B71CABD22300E2F50B /* HYBBubbleTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBBubbleTransition.h; sourceTree = ""; }; 95 | 690CA5B81CABD22300E2F50B /* HYBBubbleTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBBubbleTransition.m; sourceTree = ""; }; 96 | 690CA5B91CABD22300E2F50B /* HYBModalTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBModalTransition.h; sourceTree = ""; }; 97 | 690CA5BA1CABD22300E2F50B /* HYBModalTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBModalTransition.m; sourceTree = ""; }; 98 | 690CA5BB1CABD22300E2F50B /* HYBMoveTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBMoveTransition.h; sourceTree = ""; }; 99 | 690CA5BC1CABD22300E2F50B /* HYBMoveTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBMoveTransition.m; sourceTree = ""; }; 100 | 690CA5BD1CABD22300E2F50B /* UIViewController+HYBMoveTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+HYBMoveTransition.h"; sourceTree = ""; }; 101 | 690CA5BE1CABD22300E2F50B /* UIViewController+HYBMoveTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+HYBMoveTransition.m"; sourceTree = ""; }; 102 | 690FC9341CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBModalBubbleTopRightViewController.h; sourceTree = ""; }; 103 | 690FC9351CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBModalBubbleTopRightViewController.m; sourceTree = ""; }; 104 | 690FC9381CAB68BC0002E6A9 /* HYBBubbleRightViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBBubbleRightViewController.h; sourceTree = ""; }; 105 | 690FC9391CAB68BC0002E6A9 /* HYBBubbleRightViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBBubbleRightViewController.m; sourceTree = ""; }; 106 | 690FC9431CAB75B00002E6A9 /* HYBModalHalfController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBModalHalfController.h; sourceTree = ""; }; 107 | 690FC9441CAB75B00002E6A9 /* HYBModalHalfController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBModalHalfController.m; sourceTree = ""; }; 108 | 690FC9471CAB75C30002E6A9 /* HYBModalHalfDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBModalHalfDetailController.h; sourceTree = ""; }; 109 | 690FC9481CAB75C30002E6A9 /* HYBModalHalfDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBModalHalfDetailController.m; sourceTree = ""; }; 110 | 690FC94C1CAB76520002E6A9 /* img1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img1.jpg; sourceTree = ""; }; 111 | 690FC94D1CAB76520002E6A9 /* img10.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img10.jpg; sourceTree = ""; }; 112 | 690FC94E1CAB76520002E6A9 /* img11.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img11.jpg; sourceTree = ""; }; 113 | 690FC94F1CAB76520002E6A9 /* img12.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img12.jpg; sourceTree = ""; }; 114 | 690FC9501CAB76520002E6A9 /* img2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img2.jpg; sourceTree = ""; }; 115 | 690FC9511CAB76520002E6A9 /* img3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img3.jpg; sourceTree = ""; }; 116 | 690FC9521CAB76520002E6A9 /* img4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img4.jpg; sourceTree = ""; }; 117 | 690FC9531CAB76520002E6A9 /* img5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img5.jpg; sourceTree = ""; }; 118 | 690FC9541CAB76520002E6A9 /* img6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img6.jpg; sourceTree = ""; }; 119 | 690FC9551CAB76520002E6A9 /* img7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img7.jpg; sourceTree = ""; }; 120 | 690FC9561CAB76520002E6A9 /* img8.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img8.jpg; sourceTree = ""; }; 121 | 690FC9571CAB76520002E6A9 /* img9.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = img9.jpg; sourceTree = ""; }; 122 | 690FC97C1CAB9A0E0002E6A9 /* HYBMoveDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBMoveDetailController.h; sourceTree = ""; }; 123 | 690FC97D1CAB9A0E0002E6A9 /* HYBMoveDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBMoveDetailController.m; sourceTree = ""; }; 124 | 690FC9801CAB9A630002E6A9 /* HYBGridCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBGridCell.h; sourceTree = ""; }; 125 | 690FC9811CAB9A630002E6A9 /* HYBGridCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBGridCell.m; sourceTree = ""; }; 126 | 690FC9821CAB9A630002E6A9 /* HYBGridModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBGridModel.h; sourceTree = ""; }; 127 | 690FC9831CAB9A630002E6A9 /* HYBGridModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBGridModel.m; sourceTree = ""; }; 128 | 690FC9841CAB9A630002E6A9 /* HYBMoveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBMoveViewController.h; sourceTree = ""; }; 129 | 690FC9851CAB9A630002E6A9 /* HYBMoveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBMoveViewController.m; sourceTree = ""; }; 130 | 6929D40A1CB4B2CD0012A2CF /* HYBEaseInOutTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBEaseInOutTransition.h; sourceTree = ""; }; 131 | 6929D40B1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBEaseInOutTransition.m; sourceTree = ""; }; 132 | 6929D40F1CB4B4B30012A2CF /* HYBEaseInOutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBEaseInOutController.h; sourceTree = ""; }; 133 | 6929D4101CB4B4B30012A2CF /* HYBEaseInOutController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBEaseInOutController.m; sourceTree = ""; }; 134 | 6929D4131CB4B4C50012A2CF /* HYBEaseInOutDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBEaseInOutDetailController.h; sourceTree = ""; }; 135 | 6929D4141CB4B4C50012A2CF /* HYBEaseInOutDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBEaseInOutDetailController.m; sourceTree = ""; }; 136 | 69406D401CAAB6BF00479B8A /* HYBTransitionAnimations.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HYBTransitionAnimations.app; sourceTree = BUILT_PRODUCTS_DIR; }; 137 | 69406D441CAAB6BF00479B8A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 138 | 69406D461CAAB6BF00479B8A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 139 | 69406D471CAAB6BF00479B8A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 140 | 69406D491CAAB6BF00479B8A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 141 | 69406D4A1CAAB6BF00479B8A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 142 | 69406D4D1CAAB6BF00479B8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 143 | 69406D4F1CAAB6BF00479B8A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 144 | 69406D521CAAB6BF00479B8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 145 | 69406D541CAAB6BF00479B8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 146 | 69406D591CAAB6BF00479B8A /* HYBTransitionAnimationsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HYBTransitionAnimationsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 147 | 69406D5D1CAAB6BF00479B8A /* HYBTransitionAnimationsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HYBTransitionAnimationsTests.m; sourceTree = ""; }; 148 | 69406D5F1CAAB6BF00479B8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 149 | 69406D711CAAD38B00479B8A /* HYBModalBubbleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBModalBubbleViewController.h; sourceTree = ""; }; 150 | 69406D721CAAD38B00479B8A /* HYBModalBubbleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBModalBubbleViewController.m; sourceTree = ""; }; 151 | 69406D751CAAD49C00479B8A /* HYBBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBBaseViewController.h; sourceTree = ""; }; 152 | 69406D761CAAD49C00479B8A /* HYBBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBBaseViewController.m; sourceTree = ""; }; 153 | 69406D7B1CAAD55100479B8A /* HYBBubbleFromBottomController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBBubbleFromBottomController.h; sourceTree = ""; }; 154 | 69406D7C1CAAD55100479B8A /* HYBBubbleFromBottomController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBBubbleFromBottomController.m; sourceTree = ""; }; 155 | /* End PBXFileReference section */ 156 | 157 | /* Begin PBXFrameworksBuildPhase section */ 158 | 69406D3D1CAAB6BF00479B8A /* Frameworks */ = { 159 | isa = PBXFrameworksBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | 69406D561CAAB6BF00479B8A /* Frameworks */ = { 166 | isa = PBXFrameworksBuildPhase; 167 | buildActionMask = 2147483647; 168 | files = ( 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXFrameworksBuildPhase section */ 173 | 174 | /* Begin PBXGroup section */ 175 | 690CA5B41CABD22300E2F50B /* HYBControllerTransitions */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 690CA5B51CABD22300E2F50B /* HYBBaseTransition.h */, 179 | 690CA5B61CABD22300E2F50B /* HYBBaseTransition.m */, 180 | 69204B5E1CB5064B0076D76F /* Push&Pop&Present&Dismiss */, 181 | 6929D4041CB4B2700012A2CF /* Present&Dismiss */, 182 | 6929D4051CB4B2860012A2CF /* Push&Pop */, 183 | ); 184 | path = HYBControllerTransitions; 185 | sourceTree = ""; 186 | }; 187 | 690FC9421CAB758F0002E6A9 /* Demo3-modal */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 690FC9431CAB75B00002E6A9 /* HYBModalHalfController.h */, 191 | 690FC9441CAB75B00002E6A9 /* HYBModalHalfController.m */, 192 | 690FC9471CAB75C30002E6A9 /* HYBModalHalfDetailController.h */, 193 | 690FC9481CAB75C30002E6A9 /* HYBModalHalfDetailController.m */, 194 | ); 195 | name = "Demo3-modal"; 196 | sourceTree = ""; 197 | }; 198 | 690FC94B1CAB76520002E6A9 /* images */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | 690FC94C1CAB76520002E6A9 /* img1.jpg */, 202 | 690FC94D1CAB76520002E6A9 /* img10.jpg */, 203 | 690FC94E1CAB76520002E6A9 /* img11.jpg */, 204 | 690FC94F1CAB76520002E6A9 /* img12.jpg */, 205 | 690FC9501CAB76520002E6A9 /* img2.jpg */, 206 | 690FC9511CAB76520002E6A9 /* img3.jpg */, 207 | 690FC9521CAB76520002E6A9 /* img4.jpg */, 208 | 690FC9531CAB76520002E6A9 /* img5.jpg */, 209 | 690FC9541CAB76520002E6A9 /* img6.jpg */, 210 | 690FC9551CAB76520002E6A9 /* img7.jpg */, 211 | 690FC9561CAB76520002E6A9 /* img8.jpg */, 212 | 690FC9571CAB76520002E6A9 /* img9.jpg */, 213 | ); 214 | path = images; 215 | sourceTree = ""; 216 | }; 217 | 690FC9771CAB99C60002E6A9 /* Demo4-Move-transition */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 690FC9801CAB9A630002E6A9 /* HYBGridCell.h */, 221 | 690FC9811CAB9A630002E6A9 /* HYBGridCell.m */, 222 | 690FC9821CAB9A630002E6A9 /* HYBGridModel.h */, 223 | 690FC9831CAB9A630002E6A9 /* HYBGridModel.m */, 224 | 690FC9841CAB9A630002E6A9 /* HYBMoveViewController.h */, 225 | 690FC9851CAB9A630002E6A9 /* HYBMoveViewController.m */, 226 | 690FC97C1CAB9A0E0002E6A9 /* HYBMoveDetailController.h */, 227 | 690FC97D1CAB9A0E0002E6A9 /* HYBMoveDetailController.m */, 228 | ); 229 | name = "Demo4-Move-transition"; 230 | sourceTree = ""; 231 | }; 232 | 69204B5E1CB5064B0076D76F /* Push&Pop&Present&Dismiss */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 6929D4091CB4B2A80012A2CF /* EaseInout */, 236 | ); 237 | name = "Push&Pop&Present&Dismiss"; 238 | sourceTree = ""; 239 | }; 240 | 6929D4041CB4B2700012A2CF /* Present&Dismiss */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 6929D4071CB4B29B0012A2CF /* Bubble */, 244 | 6929D4081CB4B2A10012A2CF /* Modal */, 245 | ); 246 | name = "Present&Dismiss"; 247 | sourceTree = ""; 248 | }; 249 | 6929D4051CB4B2860012A2CF /* Push&Pop */ = { 250 | isa = PBXGroup; 251 | children = ( 252 | 6929D4061CB4B2940012A2CF /* Move */, 253 | ); 254 | name = "Push&Pop"; 255 | sourceTree = ""; 256 | }; 257 | 6929D4061CB4B2940012A2CF /* Move */ = { 258 | isa = PBXGroup; 259 | children = ( 260 | 690CA5BC1CABD22300E2F50B /* HYBMoveTransition.m */, 261 | 690CA5BB1CABD22300E2F50B /* HYBMoveTransition.h */, 262 | 690CA5BD1CABD22300E2F50B /* UIViewController+HYBMoveTransition.h */, 263 | 690CA5BE1CABD22300E2F50B /* UIViewController+HYBMoveTransition.m */, 264 | ); 265 | name = Move; 266 | sourceTree = ""; 267 | }; 268 | 6929D4071CB4B29B0012A2CF /* Bubble */ = { 269 | isa = PBXGroup; 270 | children = ( 271 | 690CA5B71CABD22300E2F50B /* HYBBubbleTransition.h */, 272 | 690CA5B81CABD22300E2F50B /* HYBBubbleTransition.m */, 273 | ); 274 | name = Bubble; 275 | sourceTree = ""; 276 | }; 277 | 6929D4081CB4B2A10012A2CF /* Modal */ = { 278 | isa = PBXGroup; 279 | children = ( 280 | 690CA5B91CABD22300E2F50B /* HYBModalTransition.h */, 281 | 690CA5BA1CABD22300E2F50B /* HYBModalTransition.m */, 282 | ); 283 | name = Modal; 284 | sourceTree = ""; 285 | }; 286 | 6929D4091CB4B2A80012A2CF /* EaseInout */ = { 287 | isa = PBXGroup; 288 | children = ( 289 | 6929D40A1CB4B2CD0012A2CF /* HYBEaseInOutTransition.h */, 290 | 6929D40B1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m */, 291 | ); 292 | name = EaseInout; 293 | sourceTree = ""; 294 | }; 295 | 6929D40E1CB4B4860012A2CF /* Demo5-EaseInOutTransition */ = { 296 | isa = PBXGroup; 297 | children = ( 298 | 6929D40F1CB4B4B30012A2CF /* HYBEaseInOutController.h */, 299 | 6929D4101CB4B4B30012A2CF /* HYBEaseInOutController.m */, 300 | 6929D4131CB4B4C50012A2CF /* HYBEaseInOutDetailController.h */, 301 | 6929D4141CB4B4C50012A2CF /* HYBEaseInOutDetailController.m */, 302 | ); 303 | name = "Demo5-EaseInOutTransition"; 304 | sourceTree = ""; 305 | }; 306 | 69406D371CAAB6BF00479B8A = { 307 | isa = PBXGroup; 308 | children = ( 309 | 690CA5B41CABD22300E2F50B /* HYBControllerTransitions */, 310 | 69406D421CAAB6BF00479B8A /* HYBTransitionAnimations */, 311 | 69406D5C1CAAB6BF00479B8A /* HYBTransitionAnimationsTests */, 312 | 69406D411CAAB6BF00479B8A /* Products */, 313 | ); 314 | sourceTree = ""; 315 | }; 316 | 69406D411CAAB6BF00479B8A /* Products */ = { 317 | isa = PBXGroup; 318 | children = ( 319 | 69406D401CAAB6BF00479B8A /* HYBTransitionAnimations.app */, 320 | 69406D591CAAB6BF00479B8A /* HYBTransitionAnimationsTests.xctest */, 321 | ); 322 | name = Products; 323 | sourceTree = ""; 324 | }; 325 | 69406D421CAAB6BF00479B8A /* HYBTransitionAnimations */ = { 326 | isa = PBXGroup; 327 | children = ( 328 | 6929D40E1CB4B4860012A2CF /* Demo5-EaseInOutTransition */, 329 | 690FC9771CAB99C60002E6A9 /* Demo4-Move-transition */, 330 | 690FC9421CAB758F0002E6A9 /* Demo3-modal */, 331 | 69406D7F1CAADF1D00479B8A /* Demo2-bubble-topright */, 332 | 69406D791CAAD4AB00479B8A /* Demo1-bubble-bottom */, 333 | 69406D461CAAB6BF00479B8A /* AppDelegate.h */, 334 | 69406D471CAAB6BF00479B8A /* AppDelegate.m */, 335 | 69406D491CAAB6BF00479B8A /* ViewController.h */, 336 | 69406D4A1CAAB6BF00479B8A /* ViewController.m */, 337 | 69406D751CAAD49C00479B8A /* HYBBaseViewController.h */, 338 | 69406D761CAAD49C00479B8A /* HYBBaseViewController.m */, 339 | 69406D431CAAB6BF00479B8A /* Supporting Files */, 340 | ); 341 | path = HYBTransitionAnimations; 342 | sourceTree = ""; 343 | }; 344 | 69406D431CAAB6BF00479B8A /* Supporting Files */ = { 345 | isa = PBXGroup; 346 | children = ( 347 | 690FC94B1CAB76520002E6A9 /* images */, 348 | 69406D4F1CAAB6BF00479B8A /* Assets.xcassets */, 349 | 69406D4C1CAAB6BF00479B8A /* Main.storyboard */, 350 | 69406D511CAAB6BF00479B8A /* LaunchScreen.storyboard */, 351 | 69406D541CAAB6BF00479B8A /* Info.plist */, 352 | 69406D441CAAB6BF00479B8A /* main.m */, 353 | ); 354 | name = "Supporting Files"; 355 | sourceTree = ""; 356 | }; 357 | 69406D5C1CAAB6BF00479B8A /* HYBTransitionAnimationsTests */ = { 358 | isa = PBXGroup; 359 | children = ( 360 | 69406D5D1CAAB6BF00479B8A /* HYBTransitionAnimationsTests.m */, 361 | 69406D5F1CAAB6BF00479B8A /* Info.plist */, 362 | ); 363 | path = HYBTransitionAnimationsTests; 364 | sourceTree = ""; 365 | }; 366 | 69406D791CAAD4AB00479B8A /* Demo1-bubble-bottom */ = { 367 | isa = PBXGroup; 368 | children = ( 369 | 69406D711CAAD38B00479B8A /* HYBModalBubbleViewController.h */, 370 | 69406D721CAAD38B00479B8A /* HYBModalBubbleViewController.m */, 371 | 69406D7B1CAAD55100479B8A /* HYBBubbleFromBottomController.h */, 372 | 69406D7C1CAAD55100479B8A /* HYBBubbleFromBottomController.m */, 373 | ); 374 | name = "Demo1-bubble-bottom"; 375 | sourceTree = ""; 376 | }; 377 | 69406D7F1CAADF1D00479B8A /* Demo2-bubble-topright */ = { 378 | isa = PBXGroup; 379 | children = ( 380 | 690FC9341CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.h */, 381 | 690FC9351CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m */, 382 | 690FC9381CAB68BC0002E6A9 /* HYBBubbleRightViewController.h */, 383 | 690FC9391CAB68BC0002E6A9 /* HYBBubbleRightViewController.m */, 384 | ); 385 | name = "Demo2-bubble-topright"; 386 | sourceTree = ""; 387 | }; 388 | /* End PBXGroup section */ 389 | 390 | /* Begin PBXNativeTarget section */ 391 | 69406D3F1CAAB6BF00479B8A /* HYBTransitionAnimations */ = { 392 | isa = PBXNativeTarget; 393 | buildConfigurationList = 69406D621CAAB6BF00479B8A /* Build configuration list for PBXNativeTarget "HYBTransitionAnimations" */; 394 | buildPhases = ( 395 | 69406D3C1CAAB6BF00479B8A /* Sources */, 396 | 69406D3D1CAAB6BF00479B8A /* Frameworks */, 397 | 69406D3E1CAAB6BF00479B8A /* Resources */, 398 | ); 399 | buildRules = ( 400 | ); 401 | dependencies = ( 402 | ); 403 | name = HYBTransitionAnimations; 404 | productName = HYBTransitionAnimations; 405 | productReference = 69406D401CAAB6BF00479B8A /* HYBTransitionAnimations.app */; 406 | productType = "com.apple.product-type.application"; 407 | }; 408 | 69406D581CAAB6BF00479B8A /* HYBTransitionAnimationsTests */ = { 409 | isa = PBXNativeTarget; 410 | buildConfigurationList = 69406D651CAAB6BF00479B8A /* Build configuration list for PBXNativeTarget "HYBTransitionAnimationsTests" */; 411 | buildPhases = ( 412 | 69406D551CAAB6BF00479B8A /* Sources */, 413 | 69406D561CAAB6BF00479B8A /* Frameworks */, 414 | 69406D571CAAB6BF00479B8A /* Resources */, 415 | ); 416 | buildRules = ( 417 | ); 418 | dependencies = ( 419 | 69406D5B1CAAB6BF00479B8A /* PBXTargetDependency */, 420 | ); 421 | name = HYBTransitionAnimationsTests; 422 | productName = HYBTransitionAnimationsTests; 423 | productReference = 69406D591CAAB6BF00479B8A /* HYBTransitionAnimationsTests.xctest */; 424 | productType = "com.apple.product-type.bundle.unit-test"; 425 | }; 426 | /* End PBXNativeTarget section */ 427 | 428 | /* Begin PBXProject section */ 429 | 69406D381CAAB6BF00479B8A /* Project object */ = { 430 | isa = PBXProject; 431 | attributes = { 432 | LastUpgradeCheck = 0720; 433 | ORGANIZATIONNAME = huangyibiao; 434 | TargetAttributes = { 435 | 69406D3F1CAAB6BF00479B8A = { 436 | CreatedOnToolsVersion = 7.2.1; 437 | }; 438 | 69406D581CAAB6BF00479B8A = { 439 | CreatedOnToolsVersion = 7.2.1; 440 | TestTargetID = 69406D3F1CAAB6BF00479B8A; 441 | }; 442 | }; 443 | }; 444 | buildConfigurationList = 69406D3B1CAAB6BF00479B8A /* Build configuration list for PBXProject "HYBTransitionAnimations" */; 445 | compatibilityVersion = "Xcode 3.2"; 446 | developmentRegion = English; 447 | hasScannedForEncodings = 0; 448 | knownRegions = ( 449 | en, 450 | Base, 451 | ); 452 | mainGroup = 69406D371CAAB6BF00479B8A; 453 | productRefGroup = 69406D411CAAB6BF00479B8A /* Products */; 454 | projectDirPath = ""; 455 | projectRoot = ""; 456 | targets = ( 457 | 69406D3F1CAAB6BF00479B8A /* HYBTransitionAnimations */, 458 | 69406D581CAAB6BF00479B8A /* HYBTransitionAnimationsTests */, 459 | ); 460 | }; 461 | /* End PBXProject section */ 462 | 463 | /* Begin PBXResourcesBuildPhase section */ 464 | 69406D3E1CAAB6BF00479B8A /* Resources */ = { 465 | isa = PBXResourcesBuildPhase; 466 | buildActionMask = 2147483647; 467 | files = ( 468 | 690FC95E1CAB76520002E6A9 /* img12.jpg in Resources */, 469 | 690FC96E1CAB76520002E6A9 /* img9.jpg in Resources */, 470 | 690FC95A1CAB76520002E6A9 /* img10.jpg in Resources */, 471 | 690FC96C1CAB76520002E6A9 /* img8.jpg in Resources */, 472 | 69406D531CAAB6BF00479B8A /* LaunchScreen.storyboard in Resources */, 473 | 690FC9581CAB76520002E6A9 /* img1.jpg in Resources */, 474 | 690FC9621CAB76520002E6A9 /* img3.jpg in Resources */, 475 | 69406D501CAAB6BF00479B8A /* Assets.xcassets in Resources */, 476 | 690FC9641CAB76520002E6A9 /* img4.jpg in Resources */, 477 | 690FC96A1CAB76520002E6A9 /* img7.jpg in Resources */, 478 | 69406D4E1CAAB6BF00479B8A /* Main.storyboard in Resources */, 479 | 690FC9661CAB76520002E6A9 /* img5.jpg in Resources */, 480 | 690FC9601CAB76520002E6A9 /* img2.jpg in Resources */, 481 | 690FC9681CAB76520002E6A9 /* img6.jpg in Resources */, 482 | 690FC95C1CAB76520002E6A9 /* img11.jpg in Resources */, 483 | ); 484 | runOnlyForDeploymentPostprocessing = 0; 485 | }; 486 | 69406D571CAAB6BF00479B8A /* Resources */ = { 487 | isa = PBXResourcesBuildPhase; 488 | buildActionMask = 2147483647; 489 | files = ( 490 | 690FC9651CAB76520002E6A9 /* img4.jpg in Resources */, 491 | 690FC96F1CAB76520002E6A9 /* img9.jpg in Resources */, 492 | 690FC96B1CAB76520002E6A9 /* img7.jpg in Resources */, 493 | 690FC9671CAB76520002E6A9 /* img5.jpg in Resources */, 494 | 690FC95F1CAB76520002E6A9 /* img12.jpg in Resources */, 495 | 690FC9631CAB76520002E6A9 /* img3.jpg in Resources */, 496 | 690FC9691CAB76520002E6A9 /* img6.jpg in Resources */, 497 | 690FC9611CAB76520002E6A9 /* img2.jpg in Resources */, 498 | 690FC96D1CAB76520002E6A9 /* img8.jpg in Resources */, 499 | 690FC95B1CAB76520002E6A9 /* img10.jpg in Resources */, 500 | 690FC9591CAB76520002E6A9 /* img1.jpg in Resources */, 501 | 690FC95D1CAB76520002E6A9 /* img11.jpg in Resources */, 502 | ); 503 | runOnlyForDeploymentPostprocessing = 0; 504 | }; 505 | /* End PBXResourcesBuildPhase section */ 506 | 507 | /* Begin PBXSourcesBuildPhase section */ 508 | 69406D3C1CAAB6BF00479B8A /* Sources */ = { 509 | isa = PBXSourcesBuildPhase; 510 | buildActionMask = 2147483647; 511 | files = ( 512 | 69406D731CAAD38B00479B8A /* HYBModalBubbleViewController.m in Sources */, 513 | 690FC9491CAB75C30002E6A9 /* HYBModalHalfDetailController.m in Sources */, 514 | 690FC9451CAB75B00002E6A9 /* HYBModalHalfController.m in Sources */, 515 | 69406D771CAAD49C00479B8A /* HYBBaseViewController.m in Sources */, 516 | 690FC97E1CAB9A0E0002E6A9 /* HYBMoveDetailController.m in Sources */, 517 | 690CA5C51CABD22300E2F50B /* HYBMoveTransition.m in Sources */, 518 | 690FC9881CAB9A630002E6A9 /* HYBGridModel.m in Sources */, 519 | 69406D4B1CAAB6BF00479B8A /* ViewController.m in Sources */, 520 | 690FC98A1CAB9A630002E6A9 /* HYBMoveViewController.m in Sources */, 521 | 6929D4111CB4B4B30012A2CF /* HYBEaseInOutController.m in Sources */, 522 | 690FC9361CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m in Sources */, 523 | 69406D481CAAB6BF00479B8A /* AppDelegate.m in Sources */, 524 | 690CA5C11CABD22300E2F50B /* HYBBubbleTransition.m in Sources */, 525 | 690CA5C71CABD22300E2F50B /* UIViewController+HYBMoveTransition.m in Sources */, 526 | 690FC93A1CAB68BC0002E6A9 /* HYBBubbleRightViewController.m in Sources */, 527 | 690FC9861CAB9A630002E6A9 /* HYBGridCell.m in Sources */, 528 | 6929D4151CB4B4C50012A2CF /* HYBEaseInOutDetailController.m in Sources */, 529 | 690CA5C31CABD22300E2F50B /* HYBModalTransition.m in Sources */, 530 | 690CA5BF1CABD22300E2F50B /* HYBBaseTransition.m in Sources */, 531 | 69406D7D1CAAD55100479B8A /* HYBBubbleFromBottomController.m in Sources */, 532 | 6929D40C1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m in Sources */, 533 | 69406D451CAAB6BF00479B8A /* main.m in Sources */, 534 | ); 535 | runOnlyForDeploymentPostprocessing = 0; 536 | }; 537 | 69406D551CAAB6BF00479B8A /* Sources */ = { 538 | isa = PBXSourcesBuildPhase; 539 | buildActionMask = 2147483647; 540 | files = ( 541 | 690FC9461CAB75B00002E6A9 /* HYBModalHalfController.m in Sources */, 542 | 690FC9871CAB9A630002E6A9 /* HYBGridCell.m in Sources */, 543 | 690CA5C01CABD22300E2F50B /* HYBBaseTransition.m in Sources */, 544 | 690CA5C61CABD22300E2F50B /* HYBMoveTransition.m in Sources */, 545 | 69406D781CAAD49C00479B8A /* HYBBaseViewController.m in Sources */, 546 | 690FC9891CAB9A630002E6A9 /* HYBGridModel.m in Sources */, 547 | 69406D741CAAD38B00479B8A /* HYBModalBubbleViewController.m in Sources */, 548 | 690FC98B1CAB9A630002E6A9 /* HYBMoveViewController.m in Sources */, 549 | 690CA5C41CABD22300E2F50B /* HYBModalTransition.m in Sources */, 550 | 690FC94A1CAB75C30002E6A9 /* HYBModalHalfDetailController.m in Sources */, 551 | 69406D7E1CAAD55100479B8A /* HYBBubbleFromBottomController.m in Sources */, 552 | 690FC97F1CAB9A0E0002E6A9 /* HYBMoveDetailController.m in Sources */, 553 | 6929D40D1CB4B2CD0012A2CF /* HYBEaseInOutTransition.m in Sources */, 554 | 6929D4121CB4B4B30012A2CF /* HYBEaseInOutController.m in Sources */, 555 | 690FC9371CAB4AB30002E6A9 /* HYBModalBubbleTopRightViewController.m in Sources */, 556 | 690FC93B1CAB68BC0002E6A9 /* HYBBubbleRightViewController.m in Sources */, 557 | 6929D4161CB4B4C50012A2CF /* HYBEaseInOutDetailController.m in Sources */, 558 | 690CA5C21CABD22300E2F50B /* HYBBubbleTransition.m in Sources */, 559 | 690CA5C81CABD22300E2F50B /* UIViewController+HYBMoveTransition.m in Sources */, 560 | 69406D5E1CAAB6BF00479B8A /* HYBTransitionAnimationsTests.m in Sources */, 561 | ); 562 | runOnlyForDeploymentPostprocessing = 0; 563 | }; 564 | /* End PBXSourcesBuildPhase section */ 565 | 566 | /* Begin PBXTargetDependency section */ 567 | 69406D5B1CAAB6BF00479B8A /* PBXTargetDependency */ = { 568 | isa = PBXTargetDependency; 569 | target = 69406D3F1CAAB6BF00479B8A /* HYBTransitionAnimations */; 570 | targetProxy = 69406D5A1CAAB6BF00479B8A /* PBXContainerItemProxy */; 571 | }; 572 | /* End PBXTargetDependency section */ 573 | 574 | /* Begin PBXVariantGroup section */ 575 | 69406D4C1CAAB6BF00479B8A /* Main.storyboard */ = { 576 | isa = PBXVariantGroup; 577 | children = ( 578 | 69406D4D1CAAB6BF00479B8A /* Base */, 579 | ); 580 | name = Main.storyboard; 581 | sourceTree = ""; 582 | }; 583 | 69406D511CAAB6BF00479B8A /* LaunchScreen.storyboard */ = { 584 | isa = PBXVariantGroup; 585 | children = ( 586 | 69406D521CAAB6BF00479B8A /* Base */, 587 | ); 588 | name = LaunchScreen.storyboard; 589 | sourceTree = ""; 590 | }; 591 | /* End PBXVariantGroup section */ 592 | 593 | /* Begin XCBuildConfiguration section */ 594 | 69406D601CAAB6BF00479B8A /* Debug */ = { 595 | isa = XCBuildConfiguration; 596 | buildSettings = { 597 | ALWAYS_SEARCH_USER_PATHS = NO; 598 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 599 | CLANG_CXX_LIBRARY = "libc++"; 600 | CLANG_ENABLE_MODULES = YES; 601 | CLANG_ENABLE_OBJC_ARC = YES; 602 | CLANG_WARN_BOOL_CONVERSION = YES; 603 | CLANG_WARN_CONSTANT_CONVERSION = YES; 604 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 605 | CLANG_WARN_EMPTY_BODY = YES; 606 | CLANG_WARN_ENUM_CONVERSION = YES; 607 | CLANG_WARN_INT_CONVERSION = YES; 608 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 609 | CLANG_WARN_UNREACHABLE_CODE = YES; 610 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 611 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 612 | COPY_PHASE_STRIP = NO; 613 | DEBUG_INFORMATION_FORMAT = dwarf; 614 | ENABLE_STRICT_OBJC_MSGSEND = YES; 615 | ENABLE_TESTABILITY = YES; 616 | GCC_C_LANGUAGE_STANDARD = gnu99; 617 | GCC_DYNAMIC_NO_PIC = NO; 618 | GCC_NO_COMMON_BLOCKS = YES; 619 | GCC_OPTIMIZATION_LEVEL = 0; 620 | GCC_PREPROCESSOR_DEFINITIONS = ( 621 | "DEBUG=1", 622 | "$(inherited)", 623 | ); 624 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 625 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 626 | GCC_WARN_UNDECLARED_SELECTOR = YES; 627 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 628 | GCC_WARN_UNUSED_FUNCTION = YES; 629 | GCC_WARN_UNUSED_VARIABLE = YES; 630 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 631 | MTL_ENABLE_DEBUG_INFO = YES; 632 | ONLY_ACTIVE_ARCH = YES; 633 | SDKROOT = iphoneos; 634 | }; 635 | name = Debug; 636 | }; 637 | 69406D611CAAB6BF00479B8A /* Release */ = { 638 | isa = XCBuildConfiguration; 639 | buildSettings = { 640 | ALWAYS_SEARCH_USER_PATHS = NO; 641 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 642 | CLANG_CXX_LIBRARY = "libc++"; 643 | CLANG_ENABLE_MODULES = YES; 644 | CLANG_ENABLE_OBJC_ARC = YES; 645 | CLANG_WARN_BOOL_CONVERSION = YES; 646 | CLANG_WARN_CONSTANT_CONVERSION = YES; 647 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 648 | CLANG_WARN_EMPTY_BODY = YES; 649 | CLANG_WARN_ENUM_CONVERSION = YES; 650 | CLANG_WARN_INT_CONVERSION = YES; 651 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 652 | CLANG_WARN_UNREACHABLE_CODE = YES; 653 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 654 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 655 | COPY_PHASE_STRIP = NO; 656 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 657 | ENABLE_NS_ASSERTIONS = NO; 658 | ENABLE_STRICT_OBJC_MSGSEND = YES; 659 | GCC_C_LANGUAGE_STANDARD = gnu99; 660 | GCC_NO_COMMON_BLOCKS = YES; 661 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 662 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 663 | GCC_WARN_UNDECLARED_SELECTOR = YES; 664 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 665 | GCC_WARN_UNUSED_FUNCTION = YES; 666 | GCC_WARN_UNUSED_VARIABLE = YES; 667 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 668 | MTL_ENABLE_DEBUG_INFO = NO; 669 | SDKROOT = iphoneos; 670 | VALIDATE_PRODUCT = YES; 671 | }; 672 | name = Release; 673 | }; 674 | 69406D631CAAB6BF00479B8A /* Debug */ = { 675 | isa = XCBuildConfiguration; 676 | buildSettings = { 677 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 678 | INFOPLIST_FILE = HYBTransitionAnimations/Info.plist; 679 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 680 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.HYBTransitionAnimations; 681 | PRODUCT_NAME = "$(TARGET_NAME)"; 682 | }; 683 | name = Debug; 684 | }; 685 | 69406D641CAAB6BF00479B8A /* Release */ = { 686 | isa = XCBuildConfiguration; 687 | buildSettings = { 688 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 689 | INFOPLIST_FILE = HYBTransitionAnimations/Info.plist; 690 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 691 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.HYBTransitionAnimations; 692 | PRODUCT_NAME = "$(TARGET_NAME)"; 693 | }; 694 | name = Release; 695 | }; 696 | 69406D661CAAB6BF00479B8A /* Debug */ = { 697 | isa = XCBuildConfiguration; 698 | buildSettings = { 699 | BUNDLE_LOADER = "$(TEST_HOST)"; 700 | INFOPLIST_FILE = HYBTransitionAnimationsTests/Info.plist; 701 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 702 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.HYBTransitionAnimationsTests; 703 | PRODUCT_NAME = "$(TARGET_NAME)"; 704 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HYBTransitionAnimations.app/HYBTransitionAnimations"; 705 | }; 706 | name = Debug; 707 | }; 708 | 69406D671CAAB6BF00479B8A /* Release */ = { 709 | isa = XCBuildConfiguration; 710 | buildSettings = { 711 | BUNDLE_LOADER = "$(TEST_HOST)"; 712 | INFOPLIST_FILE = HYBTransitionAnimationsTests/Info.plist; 713 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 714 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.HYBTransitionAnimationsTests; 715 | PRODUCT_NAME = "$(TARGET_NAME)"; 716 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HYBTransitionAnimations.app/HYBTransitionAnimations"; 717 | }; 718 | name = Release; 719 | }; 720 | /* End XCBuildConfiguration section */ 721 | 722 | /* Begin XCConfigurationList section */ 723 | 69406D3B1CAAB6BF00479B8A /* Build configuration list for PBXProject "HYBTransitionAnimations" */ = { 724 | isa = XCConfigurationList; 725 | buildConfigurations = ( 726 | 69406D601CAAB6BF00479B8A /* Debug */, 727 | 69406D611CAAB6BF00479B8A /* Release */, 728 | ); 729 | defaultConfigurationIsVisible = 0; 730 | defaultConfigurationName = Release; 731 | }; 732 | 69406D621CAAB6BF00479B8A /* Build configuration list for PBXNativeTarget "HYBTransitionAnimations" */ = { 733 | isa = XCConfigurationList; 734 | buildConfigurations = ( 735 | 69406D631CAAB6BF00479B8A /* Debug */, 736 | 69406D641CAAB6BF00479B8A /* Release */, 737 | ); 738 | defaultConfigurationIsVisible = 0; 739 | defaultConfigurationName = Release; 740 | }; 741 | 69406D651CAAB6BF00479B8A /* Build configuration list for PBXNativeTarget "HYBTransitionAnimationsTests" */ = { 742 | isa = XCConfigurationList; 743 | buildConfigurations = ( 744 | 69406D661CAAB6BF00479B8A /* Debug */, 745 | 69406D671CAAB6BF00479B8A /* Release */, 746 | ); 747 | defaultConfigurationIsVisible = 0; 748 | defaultConfigurationName = Release; 749 | }; 750 | /* End XCConfigurationList section */ 751 | }; 752 | rootObject = 69406D381CAAB6BF00479B8A /* Project object */; 753 | } 754 | -------------------------------------------------------------------------------- /HYBTransitionAnimations.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HYBTransitionAnimations.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /HYBTransitionAnimations.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /HYBTransitionAnimations.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/HYBTransitionAnimations.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 79 | 80 | 81 | 82 | 88 | 90 | 96 | 97 | 98 | 99 | 101 | 102 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /HYBTransitionAnimations.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HYBTransitionAnimations.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 69406D3F1CAAB6BF00479B8A 16 | 17 | primary 18 | 19 | 20 | 69406D581CAAB6BF00479B8A 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /HYBTransitionAnimations/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBBaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBaseViewController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBBaseViewController : UIViewController 12 | 13 | - (instancetype)initWithTitle:(NSString *)title; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBBaseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBaseViewController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @implementation HYBBaseViewController 12 | 13 | - (instancetype)initWithTitle:(NSString *)title { 14 | if (self = [super init]) { 15 | self.title = title; 16 | } 17 | 18 | return self; 19 | } 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | self.view.backgroundColor = [UIColor whiteColor]; 25 | self.edgesForExtendedLayout = UIRectEdgeNone; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBBubbleFromBottomController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBubbleFromBottomController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HYBBaseViewController.h" 11 | 12 | @interface HYBBubbleFromBottomController : HYBBaseViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBBubbleFromBottomController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBubbleFromBottomController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBubbleFromBottomController.h" 10 | 11 | @implementation HYBBubbleFromBottomController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | 17 | UILabel *label = [[UILabel alloc] init]; 18 | label.frame = (CGRect){0, 80, self.view.bounds.size.width, 80}; 19 | label.text = @"标哥的技术博客"; 20 | label.textAlignment = NSTextAlignmentCenter; 21 | label.font = [UIFont boldSystemFontOfSize:30]; 22 | label.textColor = [UIColor whiteColor]; 23 | [self.view addSubview:label]; 24 | 25 | label = [[UILabel alloc] init]; 26 | label.frame = (CGRect){30, 160, self.view.bounds.size.width - 60, 80}; 27 | label.text = @"Bubble from the bottom of view."; 28 | label.numberOfLines = 0; 29 | label.textAlignment = NSTextAlignmentCenter; 30 | label.font = [UIFont boldSystemFontOfSize:30]; 31 | label.textColor = [UIColor whiteColor]; 32 | [self.view addSubview:label]; 33 | 34 | self.view.backgroundColor = [UIColor purpleColor]; 35 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 36 | button.frame = CGRectMake((self.view.frame.size.width - 80) / 2, 37 | self.view.frame.size.height - 80, 38 | 80, 39 | 80); 40 | [button setTitle:@"+" forState:UIControlStateNormal]; 41 | [button setTitleColor:[UIColor purpleColor] forState:UIControlStateNormal]; 42 | button.backgroundColor = [UIColor whiteColor]; 43 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 44 | [self.view addSubview:button]; 45 | button.layer.cornerRadius = 40; 46 | button.tag = 1010; 47 | [button addTarget:self 48 | action:@selector(dismiss) 49 | forControlEvents:UIControlEventTouchUpInside]; 50 | } 51 | 52 | - (void)dismiss { 53 | [self dismissViewControllerAnimated:YES completion:NULL]; 54 | } 55 | @end 56 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBBubbleRightViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBubbleRightViewController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBBubbleRightViewController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBBubbleRightViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBBubbleRightViewController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBubbleRightViewController.h" 10 | 11 | @implementation HYBBubbleRightViewController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | 17 | UILabel *label = [[UILabel alloc] init]; 18 | label.frame = (CGRect){0, 180, self.view.bounds.size.width, 80}; 19 | label.text = @"标哥的技术博客"; 20 | label.textAlignment = NSTextAlignmentCenter; 21 | label.font = [UIFont boldSystemFontOfSize:30]; 22 | label.textColor = [UIColor whiteColor]; 23 | [self.view addSubview:label]; 24 | 25 | label = [[UILabel alloc] init]; 26 | label.frame = (CGRect){30, 260, self.view.bounds.size.width - 60, 80}; 27 | label.text = @"Bubble from the bottom of view."; 28 | label.numberOfLines = 0; 29 | label.textAlignment = NSTextAlignmentCenter; 30 | label.font = [UIFont boldSystemFontOfSize:30]; 31 | label.textColor = [UIColor whiteColor]; 32 | [self.view addSubview:label]; 33 | 34 | self.view.backgroundColor = [UIColor purpleColor]; 35 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 36 | button.frame = CGRectMake(self.view.frame.size.width - 80, 37 | 80, 38 | 80, 39 | 80); 40 | [button setTitle:@"+" forState:UIControlStateNormal]; 41 | [button setTitleColor:[UIColor purpleColor] forState:UIControlStateNormal]; 42 | button.backgroundColor = [UIColor whiteColor]; 43 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 44 | [self.view addSubview:button]; 45 | button.layer.cornerRadius = 40; 46 | button.tag = 1010; 47 | [button addTarget:self 48 | action:@selector(dismiss) 49 | forControlEvents:UIControlEventTouchUpInside]; 50 | } 51 | 52 | - (void)dismiss { 53 | [self dismissViewControllerAnimated:YES completion:NULL]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBEaseInOutController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBEaseInOutController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/4/6. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBEaseInOutController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBEaseInOutController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBEaseInOutController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/4/6. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBEaseInOutController.h" 10 | #import "HYBEaseInOutDetailController.h" 11 | #import "HYBEaseInOutTransition.h" 12 | 13 | @interface HYBEaseInOutController () 14 | 15 | @property (nonatomic, strong) HYBEaseInOutTransition *transition; 16 | 17 | @end 18 | 19 | @implementation HYBEaseInOutController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | UIImageView *imgView = [[UIImageView alloc] init]; 25 | imgView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 120); 26 | imgView.image = [UIImage imageNamed:@"img5.jpg"]; 27 | imgView.contentMode = UIViewContentModeScaleAspectFit; 28 | [self.view addSubview:imgView]; 29 | 30 | self.view.backgroundColor = [UIColor whiteColor]; 31 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 32 | button.frame = CGRectMake((self.view.frame.size.width - 80) / 2, 33 | self.view.frame.size.height - 80 - 64, 34 | 80, 35 | 80); 36 | [button setTitle:@"+" forState:UIControlStateNormal]; 37 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 38 | button.backgroundColor = [UIColor purpleColor]; 39 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 40 | [self.view addSubview:button]; 41 | button.tag = 1010; 42 | button.layer.cornerRadius = 40; 43 | [button addTarget:self action:@selector(onPresent) forControlEvents:UIControlEventTouchUpInside]; 44 | } 45 | 46 | - (void)onPresent { 47 | HYBEaseInOutDetailController *vc = [[HYBEaseInOutDetailController alloc] init]; 48 | 49 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; 50 | self.transition = [[HYBEaseInOutTransition alloc] initWithPresented:^(UIViewController *presented, UIViewController *presenting, UIViewController *source, HYBBaseTransition *transition) { 51 | HYBEaseInOutTransition *modal = (HYBEaseInOutTransition *)transition; 52 | 53 | // If you don't specify, it will use default value 54 | // Default is NO, if set to YES, it will use spring animation. 55 | modal.animatedWithSpring = NO; 56 | } dismissed:^(UIViewController *dismissed, HYBBaseTransition *transition) { 57 | // do nothing 58 | }]; 59 | 60 | nav.transitioningDelegate = self.transition; 61 | [self presentViewController:nav animated:YES completion:NULL]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBEaseInOutDetailController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBEaseInOutDetailController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/4/6. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBEaseInOutDetailController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBEaseInOutDetailController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBEaseInOutDetailController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/4/6. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBEaseInOutDetailController.h" 10 | 11 | @implementation HYBEaseInOutDetailController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | self.title = @"Ease Out"; 17 | 18 | UIImageView *imgView = [[UIImageView alloc] init]; 19 | imgView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 120); 20 | imgView.image = [UIImage imageNamed:@"img6.jpg"]; 21 | imgView.contentMode = UIViewContentModeScaleAspectFit; 22 | [self.view addSubview:imgView]; 23 | 24 | self.view.backgroundColor = [UIColor whiteColor]; 25 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 26 | button.frame = CGRectMake((self.view.frame.size.width - 80) / 2, 27 | 20, 28 | 80, 29 | 80); 30 | [button setTitle:@"+" forState:UIControlStateNormal]; 31 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 32 | button.backgroundColor = [UIColor purpleColor]; 33 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 34 | [self.view addSubview:button]; 35 | button.tag = 1010; 36 | button.layer.cornerRadius = 40; 37 | [button addTarget:self action:@selector(onDismiss) forControlEvents:UIControlEventTouchUpInside]; 38 | } 39 | 40 | - (void)onDismiss { 41 | [self dismissViewControllerAnimated:YES completion:NULL]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBGridCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBGridCell.h 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class HYBGridModel; 12 | 13 | @interface HYBGridCell : UICollectionViewCell 14 | 15 | @property (nonatomic, strong) UIView *imageView; 16 | 17 | - (void)configCellWithModel:(HYBGridModel *)model; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBGridCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBGridCell.m 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBGridCell.h" 10 | #import "HYBGridModel.h" 11 | 12 | @interface HYBGridCell () 13 | 14 | @property (nonatomic, strong) UILabel *titleLabel; 15 | 16 | 17 | @end 18 | 19 | @implementation HYBGridCell 20 | 21 | - (instancetype)initWithFrame:(CGRect)frame { 22 | if (self = [super initWithFrame:frame]) { 23 | self.imageView = [[UIView alloc] init]; 24 | self.imageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.width); 25 | [self.contentView addSubview:self.imageView]; 26 | 27 | self.titleLabel = [[UILabel alloc] init]; 28 | self.titleLabel.frame = CGRectMake(0, self.frame.size.height - 20, self.frame.size.width, 20); 29 | self.titleLabel.numberOfLines = 0; 30 | self.titleLabel.font = [UIFont systemFontOfSize:16]; 31 | self.titleLabel.textColor = [UIColor whiteColor]; 32 | self.titleLabel.backgroundColor = [UIColor blackColor]; 33 | self.titleLabel.layer.masksToBounds = YES; 34 | [self.contentView addSubview:self.titleLabel]; 35 | } 36 | 37 | return self; 38 | } 39 | 40 | - (void)configCellWithModel:(HYBGridModel *)model { 41 | if (model.clipedImage) { 42 | self.imageView.layer.contents = (__bridge id _Nullable)(model.clipedImage.CGImage); 43 | } else { 44 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 45 | UIImage *image = [UIImage imageNamed:model.imageName]; 46 | image = [self clipImage:image toSize:self.imageView.frame.size]; 47 | dispatch_async(dispatch_get_main_queue(), ^{ 48 | model.clipedImage = image; 49 | self.imageView.layer.contents = (__bridge id _Nullable)(model.clipedImage.CGImage); 50 | }); 51 | }); 52 | } 53 | 54 | self.titleLabel.text = model.title; 55 | } 56 | 57 | 58 | - (UIImage *)clipImage:(UIImage *)image toSize:(CGSize)size { 59 | UIGraphicsBeginImageContextWithOptions(size, YES, [UIScreen mainScreen].scale); 60 | 61 | CGSize imgSize = image.size; 62 | CGFloat x = MAX(size.width / imgSize.width, size.height / imgSize.height); 63 | CGSize resultSize = CGSizeMake(x * imgSize.width, x * imgSize.height); 64 | 65 | [image drawInRect:CGRectMake(0, 0, resultSize.width, resultSize.height)]; 66 | 67 | UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext(); 68 | UIGraphicsEndImageContext(); 69 | 70 | return finalImage; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBGridModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBGridModel.h 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface HYBGridModel : NSObject 13 | 14 | @property (nonatomic, copy) NSString *imageName; 15 | @property (nonatomic, copy) NSString *title; 16 | 17 | // 剪裁后的图片 18 | @property (nonatomic, strong) UIImage *clipedImage; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBGridModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBGridModel.m 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBGridModel.h" 10 | 11 | @implementation HYBGridModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalBubbleTopRightViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalBubbleTopRightViewController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBModalBubbleTopRightViewController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalBubbleTopRightViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalBubbleTopRightViewController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBModalBubbleTopRightViewController.h" 10 | #import "HYBBubbleTransition.h" 11 | #import "HYBBubbleRightViewController.h" 12 | 13 | @interface HYBModalBubbleTopRightViewController () 14 | 15 | @property (nonatomic, strong) HYBBubbleTransition *bubbleTransition; 16 | 17 | @end 18 | 19 | @implementation HYBModalBubbleTopRightViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | self.title = @"bubble present from bottom"; 25 | self.view.backgroundColor = [UIColor whiteColor]; 26 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 27 | button.frame = CGRectMake(self.view.frame.size.width - 80, 28 | 0, 29 | 80, 30 | 80); 31 | [button setTitle:@"+" forState:UIControlStateNormal]; 32 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 33 | button.backgroundColor = [UIColor purpleColor]; 34 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 35 | [self.view addSubview:button]; 36 | button.tag = 1010; 37 | button.layer.cornerRadius = 40; 38 | [button addTarget:self action:@selector(onPresent) forControlEvents:UIControlEventTouchUpInside]; 39 | } 40 | 41 | - (void)onPresent { 42 | HYBBubbleRightViewController *vc = [[HYBBubbleRightViewController alloc] init]; 43 | vc.modalPresentationStyle = UIModalPresentationCustom; 44 | 45 | // Remember to own it strongly 46 | // Because delegate is weak reference, and it will be released after out of the function body. 47 | self.bubbleTransition = [[HYBBubbleTransition alloc] initWithPresented:^(UIViewController *presented, UIViewController *presenting, UIViewController *source, HYBBaseTransition *transition) { 48 | // You need to cast type to the real subclass type. 49 | HYBBubbleTransition *bubble = (HYBBubbleTransition *)transition; 50 | // If you want to use Spring animation, set to YES. 51 | // Default is NO. 52 | bubble.animatedWithSpring = YES; 53 | bubble.bubbleColor = presented.view.backgroundColor; 54 | 55 | // 由于一个控制器有导航,一个没有,导致会有64的误差,所以要记得处理这种情况 56 | CGPoint center = [self.view viewWithTag:1010].center; 57 | center.y += 64; 58 | 59 | bubble.bubbleStartPoint = center; 60 | } dismissed:^(UIViewController *dismissed, HYBBaseTransition *transition) { 61 | // Do nothing and it is ok here. 62 | // If you really want to do something, here you can set the mode. 63 | // But inside the super class, it is set to be automally. 64 | // So you do this has no meaning. 65 | transition.transitionMode = kHYBTransitionDismiss; 66 | }]; 67 | vc.transitioningDelegate = self.bubbleTransition; 68 | 69 | [self presentViewController:vc animated:YES completion:NULL]; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalBubbleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalBubbleViewController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HYBBaseViewController.h" 11 | 12 | @interface HYBModalBubbleViewController : HYBBaseViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalBubbleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalBubbleViewController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBModalBubbleViewController.h" 10 | #import "HYBBubbleTransition.h" 11 | #import "HYBBubbleFromBottomController.h" 12 | 13 | @interface HYBModalBubbleViewController () 14 | 15 | @property (nonatomic, strong) HYBBubbleTransition *bubbleTransition; 16 | 17 | @end 18 | 19 | @implementation HYBModalBubbleViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | self.title = @"bubble present from bottom"; 25 | self.view.backgroundColor = [UIColor whiteColor]; 26 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 27 | button.frame = CGRectMake((self.view.frame.size.width - 80) / 2, 28 | self.view.frame.size.height - 80 - 64, 29 | 80, 30 | 80); 31 | [button setTitle:@"+" forState:UIControlStateNormal]; 32 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 33 | button.backgroundColor = [UIColor purpleColor]; 34 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 35 | [self.view addSubview:button]; 36 | button.tag = 1010; 37 | button.layer.cornerRadius = 40; 38 | [button addTarget:self action:@selector(onPresent) forControlEvents:UIControlEventTouchUpInside]; 39 | } 40 | 41 | - (void)onPresent { 42 | HYBBubbleFromBottomController *vc = [[HYBBubbleFromBottomController alloc] init]; 43 | vc.modalPresentationStyle = UIModalPresentationCustom; 44 | 45 | // Remember to own it strongly 46 | // Because delegate is weak reference, and it will be released after out of the function body. 47 | self.bubbleTransition = [[HYBBubbleTransition alloc] initWithPresented:^(UIViewController *presented, UIViewController *presenting, UIViewController *source, HYBBaseTransition *transition) { 48 | // You need to cast type to the real subclass type. 49 | HYBBubbleTransition *bubble = (HYBBubbleTransition *)transition; 50 | 51 | // If you want to use Spring animation, set to YES. 52 | // Default is NO. 53 | // bubble.animatedWithSpring = YES; 54 | bubble.bubbleColor = presented.view.backgroundColor; 55 | 56 | // 由于一个控制器有导航,一个没有,导致会有64的误差,所以要记得处理这种情况 57 | CGPoint center = [self.view viewWithTag:1010].center; 58 | center.y += 64; 59 | 60 | bubble.bubbleStartPoint = center; 61 | } dismissed:^(UIViewController *dismissed, HYBBaseTransition *transition) { 62 | // Do nothing and it is ok here. 63 | // If you really want to do something, here you can set the mode. 64 | // But inside the super class, it is set to be automally. 65 | // So you do this has no meaning. 66 | transition.transitionMode = kHYBTransitionDismiss; 67 | }]; 68 | vc.transitioningDelegate = self.bubbleTransition; 69 | 70 | [self presentViewController:vc animated:YES completion:NULL]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalHalfController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalHalfController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBModalHalfController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalHalfController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalHalfController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBModalHalfController.h" 10 | #import "HYBModalHalfDetailController.h" 11 | #import "HYBModalTransition.h" 12 | 13 | @interface HYBModalHalfController () 14 | 15 | @property (nonatomic, strong) HYBModalTransition *transition; 16 | 17 | @end 18 | 19 | @implementation HYBModalHalfController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | UIImageView *imgView = [[UIImageView alloc] init]; 25 | imgView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 120); 26 | imgView.image = [UIImage imageNamed:@"img5.jpg"]; 27 | imgView.contentMode = UIViewContentModeScaleAspectFit; 28 | [self.view addSubview:imgView]; 29 | 30 | self.view.backgroundColor = [UIColor whiteColor]; 31 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 32 | button.frame = CGRectMake((self.view.frame.size.width - 80) / 2, 33 | self.view.frame.size.height - 80 - 64, 34 | 80, 35 | 80); 36 | [button setTitle:@"+" forState:UIControlStateNormal]; 37 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 38 | button.backgroundColor = [UIColor purpleColor]; 39 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 40 | [self.view addSubview:button]; 41 | button.tag = 1010; 42 | button.layer.cornerRadius = 40; 43 | [button addTarget:self action:@selector(onPresent) forControlEvents:UIControlEventTouchUpInside]; 44 | } 45 | 46 | - (void)onPresent { 47 | HYBModalHalfDetailController *vc = [[HYBModalHalfDetailController alloc] init]; 48 | 49 | self.transition = [[HYBModalTransition alloc] initWithPresented:^(UIViewController *presented, UIViewController *presenting, UIViewController *source, HYBBaseTransition *transition) { 50 | HYBModalTransition *modal = (HYBModalTransition *)transition; 51 | modal.scale = (CGPoint){0.95, 0.95}; 52 | 53 | // If you don't specify, it will use default value 54 | // modal.presentedHeight = 350.0; 55 | 56 | // If you don't want to, set to YES or do no set. 57 | modal.shouldDismissOnTap = YES; 58 | 59 | // Default is NO, if set to YES, it will use spring animation. 60 | modal.animatedWithSpring = YES; 61 | 62 | // Default is YES. including navigation bar when take snapshots. 63 | // When has navigation bar, if set to NO, it looks not so good. 64 | // modal.scapshotIncludingNavigationBar = NO; 65 | } dismissed:^(UIViewController *dismissed, HYBBaseTransition *transition) { 66 | // do nothing 67 | transition.transitionMode = kHYBTransitionDismiss; 68 | }]; 69 | 70 | vc.transitioningDelegate = self.transition; 71 | [self presentViewController:vc animated:YES completion:NULL]; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalHalfDetailController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalHalfDetailController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBModalHalfDetailController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBModalHalfDetailController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBModalHalfDetailController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBModalHalfDetailController.h" 10 | 11 | @implementation HYBModalHalfDetailController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | UIImageView *imgView = [[UIImageView alloc] init]; 17 | imgView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 120); 18 | imgView.image = [UIImage imageNamed:@"img6.jpg"]; 19 | imgView.contentMode = UIViewContentModeScaleAspectFit; 20 | [self.view addSubview:imgView]; 21 | 22 | self.view.backgroundColor = [UIColor whiteColor]; 23 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 24 | button.frame = CGRectMake((self.view.frame.size.width - 80) / 2, 25 | 20, 26 | 80, 27 | 80); 28 | [button setTitle:@"+" forState:UIControlStateNormal]; 29 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 30 | button.backgroundColor = [UIColor purpleColor]; 31 | button.titleLabel.font = [UIFont boldSystemFontOfSize:60]; 32 | [self.view addSubview:button]; 33 | button.tag = 1010; 34 | button.layer.cornerRadius = 40; 35 | [button addTarget:self action:@selector(onDismiss) forControlEvents:UIControlEventTouchUpInside]; 36 | } 37 | 38 | - (void)onDismiss { 39 | [self dismissViewControllerAnimated:YES completion:NULL]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBMoveDetailController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMoveDetailController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBMoveDetailController : HYBBaseViewController 12 | 13 | @property (nonatomic, assign) UIImage *image; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBMoveDetailController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBMoveDetailController.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/30. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBMoveDetailController.h" 10 | #import "HYBMoveTransition.h" 11 | 12 | @implementation HYBMoveDetailController 13 | 14 | - (instancetype)init { 15 | if (self = [super init]) { 16 | 17 | } 18 | 19 | return self; 20 | } 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | UIImageView *imgView = [[UIImageView alloc] init]; 26 | imgView.frame = CGRectMake(20, 40, self.view.frame.size.width - 40, self.view.frame.size.width - 40); 27 | 28 | self.view.backgroundColor = [UIColor whiteColor]; 29 | self.title = @"move detail"; 30 | imgView.image = self.image; 31 | [self.view addSubview:imgView]; 32 | 33 | 34 | // You must specify a target view with this. 35 | self.hyb_toTargetView = imgView; 36 | 37 | UILabel *label = [[UILabel alloc] init]; 38 | label.frame = (CGRect){0, imgView.frame.origin.y + imgView.frame.size.height, self.view.bounds.size.width, 80}; 39 | label.text = @"标哥的技术博客"; 40 | label.textAlignment = NSTextAlignmentCenter; 41 | label.font = [UIFont boldSystemFontOfSize:30]; 42 | label.textColor = [UIColor blackColor]; 43 | [self.view addSubview:label]; 44 | 45 | CGFloat y = label.frame.origin.y + label.frame.size.height; 46 | label = [[UILabel alloc] init]; 47 | label.frame = (CGRect){30, y, self.view.bounds.size.width - 60, 100}; 48 | label.text = @"In this controller, you must specify a target view. Here use the image view. So it use like this: self.hyb_toTargetView = imgView"; 49 | label.numberOfLines = 0; 50 | label.textAlignment = NSTextAlignmentLeft; 51 | label.font = [UIFont boldSystemFontOfSize:20]; 52 | label.textColor = [UIColor blackColor]; 53 | [self.view addSubview:label]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBMoveViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBGridViewController.h 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBBaseViewController.h" 10 | 11 | @interface HYBMoveViewController : HYBBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/HYBMoveViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBGridViewController.m 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBMoveViewController.h" 10 | #import "HYBGridCell.h" 11 | #import "HYBGridModel.h" 12 | #import "HYBMoveTransition.h" 13 | #import "HYBMoveDetailController.h" 14 | 15 | #define kScreenWidth ([UIScreen mainScreen].bounds.size.width) 16 | 17 | static NSString *cellIdentifier = @"gridcellidentifier"; 18 | 19 | @interface HYBMoveViewController () 20 | 21 | @property (nonatomic, strong) UICollectionView *collectionView; 22 | @property (nonatomic, strong) NSMutableArray *datasource; 23 | 24 | @property (nonatomic, strong) HYBMoveTransition *transition; 25 | 26 | @end 27 | 28 | @implementation HYBMoveViewController 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | 33 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; 34 | layout.itemSize = CGSizeMake((kScreenWidth - 30) / 2, (kScreenWidth - 30) / 2 + 20); 35 | layout.minimumLineSpacing = 10; 36 | layout.minimumInteritemSpacing = 10; 37 | 38 | self.collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds 39 | collectionViewLayout:layout]; 40 | [self.view addSubview:self.collectionView]; 41 | [self.collectionView registerClass:[HYBGridCell class] 42 | forCellWithReuseIdentifier:cellIdentifier]; 43 | self.collectionView.delegate = self; 44 | self.collectionView.backgroundColor = [UIColor blackColor]; 45 | self.collectionView.dataSource = self; 46 | 47 | int j = 0; 48 | for (NSUInteger i = 0; i < 60; ++i) { 49 | if (++j > 12) { 50 | j = 1; 51 | } 52 | HYBGridModel *model = [[HYBGridModel alloc] init]; 53 | model.imageName = [NSString stringWithFormat:@"img%d.jpg", j]; 54 | model.title = [NSString stringWithFormat:@"item%ld", i]; 55 | [self.datasource addObject:model]; 56 | } 57 | 58 | [self.collectionView reloadData]; 59 | } 60 | 61 | - (NSMutableArray *)datasource { 62 | if (_datasource == nil) { 63 | _datasource = [[NSMutableArray alloc] init]; 64 | } 65 | 66 | return _datasource; 67 | } 68 | 69 | #pragma mark - UICollectionViewDataSource & UICollectionViewDelegate 70 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView 71 | cellForItemAtIndexPath:(NSIndexPath *)indexPath { 72 | HYBGridCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier 73 | forIndexPath:indexPath]; 74 | HYBGridModel *model = self.datasource[indexPath.item]; 75 | [cell configCellWithModel:model]; 76 | 77 | return cell; 78 | } 79 | 80 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 81 | return self.datasource.count; 82 | } 83 | 84 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 85 | id navigationDelegate = self.navigationController.delegate; 86 | 87 | HYBMoveDetailController *vc = [[HYBMoveDetailController alloc] init]; 88 | HYBGridModel *model = self.datasource[indexPath.item]; 89 | vc.image = model.clipedImage; 90 | 91 | self.transition = [[HYBMoveTransition alloc] initWithPushed:^(UIViewController *fromVC, UIViewController *toVC, HYBBaseTransition *transition) { 92 | HYBMoveTransition *move = (HYBMoveTransition *)transition; 93 | HYBGridCell *cell = (HYBGridCell *)[collectionView cellForItemAtIndexPath:indexPath]; 94 | move.targetClickedView = cell.imageView; 95 | 96 | move.animatedWithSpring = YES; 97 | } poped:^(UIViewController *fromVC, UIViewController *toVC, HYBBaseTransition *transition) { 98 | // Do nothing, unless you really need to. 99 | // If you need to recode navigation controller delegate, you should add this. 100 | toVC.navigationController.delegate = navigationDelegate; 101 | }]; 102 | 103 | self.navigationController.delegate = self.transition; 104 | [self.navigationController pushViewController:vc animated:YES]; 105 | } 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CollectionViewDemos 4 | // 5 | // Created by huangyibiao on 16/3/2. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "HYBModalBubbleViewController.h" 11 | #import "HYBModalBubbleTopRightViewController.h" 12 | #import "HYBModalHalfController.h" 13 | #import "HYBMoveViewController.h" 14 | #import "HYBEaseInOutController.h" 15 | 16 | #define kCellIdentifier @"GITHUB Name CoderJackyHuang" 17 | 18 | @interface ViewController () 19 | 20 | @property (nonatomic, strong) UICollectionView *collectionView; 21 | @property (nonatomic, strong) NSArray *datasource; 22 | 23 | @end 24 | 25 | @implementation ViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | 30 | self.title = @"Test how to use transition"; 31 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; 32 | layout.scrollDirection = UICollectionViewScrollDirectionVertical; 33 | layout.itemSize = CGSizeMake(self.view.frame.size.width, 44); 34 | layout.minimumLineSpacing = 0; 35 | 36 | self.collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds 37 | collectionViewLayout:layout]; 38 | [self.view addSubview:self.collectionView]; 39 | self.collectionView.delegate = self; 40 | self.collectionView.dataSource = self; 41 | self.collectionView.showsVerticalScrollIndicator = YES; 42 | [self.collectionView registerClass:[UICollectionViewCell class] 43 | forCellWithReuseIdentifier:kCellIdentifier]; 44 | 45 | self.datasource = @[[[HYBModalBubbleViewController alloc] initWithTitle:@"Bubble from bottom"], 46 | [[HYBModalBubbleTopRightViewController alloc] initWithTitle:@"Bubble from top right"], 47 | [[HYBModalHalfController alloc] initWithTitle:@"Modal present half"], 48 | [[HYBMoveViewController alloc] initWithTitle:@"Move push/pop"], 49 | [[HYBEaseInOutController alloc] initWithTitle:@"Ease In Out"], 50 | ]; 51 | [self.collectionView reloadData]; 52 | self.collectionView.backgroundColor = [UIColor whiteColor]; 53 | } 54 | 55 | #pragma mark - UICollectionViewDataSource & UICollectionViewDelegate 56 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView 57 | cellForItemAtIndexPath:(NSIndexPath *)indexPath { 58 | UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kCellIdentifier 59 | forIndexPath:indexPath]; 60 | UILabel *titleLabel = [cell.contentView viewWithTag:100]; 61 | if (!titleLabel) { 62 | titleLabel = [[UILabel alloc] init]; 63 | titleLabel.frame = CGRectMake(20, 64 | 0, 65 | cell.contentView.bounds.size.width - 40, 66 | cell.contentView.bounds.size.height); 67 | titleLabel.tag = 100; 68 | [cell.contentView addSubview:titleLabel]; 69 | 70 | UILabel *label = [[UILabel alloc] init]; 71 | label.backgroundColor = [UIColor lightGrayColor]; 72 | label.frame = CGRectMake(0, cell.contentView.bounds.size.height, cell.contentView.bounds.size.width, 0.5); 73 | [cell.contentView addSubview:label]; 74 | } 75 | 76 | UIViewController *vc = self.datasource[indexPath.item]; 77 | titleLabel.text = vc.title; 78 | 79 | return cell; 80 | } 81 | 82 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 83 | return self.datasource.count; 84 | } 85 | 86 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 87 | UIViewController *vc = self.datasource[indexPath.item]; 88 | vc.hidesBottomBarWhenPushed = YES; 89 | [self.navigationController pushViewController:vc animated:YES]; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img1.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img10.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img11.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img12.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img2.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img3.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img4.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img5.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img6.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img7.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img8.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/images/img9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/HYBTransitionAnimations/images/img9.jpg -------------------------------------------------------------------------------- /HYBTransitionAnimations/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HYBTransitionAnimations 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /HYBTransitionAnimationsTests/HYBTransitionAnimationsTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTransitionAnimationsTests.m 3 | // HYBTransitionAnimationsTests 4 | // 5 | // Created by huangyibiao on 16/3/29. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBTransitionAnimationsTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HYBTransitionAnimationsTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /HYBTransitionAnimationsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 JackyHuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |                                                                  4 | 5 | 6 | #English Document | [中文文档](http://www.henishuo.com/transition-chinese-document/) 7 | 8 | A very helpful and an very useful library for controller custom transition. 9 | 10 | This is an open source library for developers to use custom transition, 11 | including push, pop, present and dismiss. In the library, now has supported 12 | many kind of animations that we can see in many apps. The best thing for this 13 | library is, that developers only need to call an API, without others, to support 14 | custom transition. For more information, just see the document in detail 15 | or just download the demo project to have a look. 16 | 17 | #Goal 18 | 19 | I design this library with a goal that any developer can use it directly without any knowledge 20 | about custom transition. For this, I try to make it as easy as it can. Almost all properties 21 | have default value, and just an API to call it out. 22 | 23 | Though Developers have no foudation of custom transition, they can use it directly. 24 | All custom transition protocols have been wraped in the base transtion, you still can use 25 | it to add special effect. for this, just inherit from the HYBBaseTransition class. 26 | 27 | #Version Changes 28 | 29 | ##Version 1.2.0 30 | 31 | * Fix in ios7, it shows wrong in Lanscape. 32 | * Add ease in ease out transition animations for push/pop、present/dismiss 33 | 34 | ##Version 1.1.0 35 | 36 | * fix a bug that it will be black when pushed to a controller and then go toHome, it means enter into background. Now I have set the navigation controller's delegate to nil when it was poped. 37 | 38 | 39 | ##Version 1.0.1 40 | 41 | * fix document 42 | 43 | 44 | 45 | 46 | #Support Spring Animation 47 | 48 | If you want to transition with Spring Animation, you can try this. 49 | 50 | ``` 51 | /** 52 | * Default is NO, if set to YES, it will be presented and dismissed with 53 | * spring animation. 54 | */ 55 | @property (nonatomic, assign) BOOL animatedWithSpring; 56 | ``` 57 | 58 | You can specify damp, initialSpringVerlocity, they have default values. 59 | 60 | ``` 61 | /** 62 | * The initial Spring velocity, Only when animatedWithSpring is YES, it will take effect. 63 | * Default is 1.0 / 0.5. If you don't know, just use the default value. 64 | */ 65 | @property (nonatomic, assign) CGFloat initialSpringVelocity; 66 | 67 | /** 68 | * The Spring damp, Only when animatedWithSpring is YES, it will take effect. 69 | * 70 | * Default is 0.5. If you don't know, just use the default value. 71 | */ 72 | @property (nonatomic, assign) CGFloat damp; 73 | ``` 74 | 75 | 76 | 77 | #Buble Effect Transition 78 | 79 | A custom modal transition that presents and dismiss a controller with an expanding bubble effect. 80 | The bubble transition only supports present and dismiis mode. 81 | 82 | ![image](https://github.com/CoderJackyHuang/HYBControllerTransitions/blob/master/bubble.gif) 83 | 84 | 85 | It's easy to use, just in the presenting controller callback event to add custom transition, like below: 86 | 87 | ``` 88 | - (void)onPresent { 89 | HYBBubbleFromBottomController *vc = [[HYBBubbleFromBottomController alloc] init]; 90 | vc.modalPresentationStyle = UIModalPresentationCustom; 91 | 92 | // Remember to own it strongly 93 | // Because delegate is weak reference, and it will be released after out of the function body. 94 | self.bubbleTransition = [[HYBBubbleTransition alloc] initWithPresented:^(UIViewController *presented, UIViewController *presenting, UIViewController *source, HYBBaseTransition *transition) { 95 | // You need to cast type to the real subclass type. 96 | HYBBubbleTransition *bubble = (HYBBubbleTransition *)transition; 97 | 98 | // If you want to use Spring animation, set to YES. 99 | // Default is NO. 100 | // bubble.animatedWithSpring = YES; 101 | bubble.bubbleColor = presented.view.backgroundColor; 102 | 103 | // If one have a navigation bar but another not, you should handle the difference by yourself. 104 | CGPoint center = [self.view viewWithTag:1010].center; 105 | center.y += 64; 106 | 107 | bubble.bubbleStartPoint = center; 108 | } dismissed:^(UIViewController *dismissed, HYBBaseTransition *transition) { 109 | // Do nothing and it is ok here. 110 | // If you really want to do something, here you can set the mode. 111 | // But inside the super class, it is set to be automally. 112 | // So you do this has no meaning. 113 | transition.transitionMode = kHYBTransitionDismiss; 114 | }]; 115 | vc.transitioningDelegate = self.bubbleTransition; 116 | 117 | [self presentViewController:vc animated:YES completion:NULL]; 118 | } 119 | ``` 120 | 121 | For example, AController has an event onPresent, when it is clicked, it will be invoked. 122 | Now, AController needs to present BController, just use the code like above. In BController, 123 | you don't need to do anything. It is easy? 124 | 125 | For more information, you should see the properties provided, almost every property has default value. 126 | So at many times, you don't need to worry about how to use. 127 | 128 | #Modal Effect Transition 129 | 130 | Modal transition animation, it will show usually half for the destination view controller's view, 131 | and scale the from view. 132 | 133 | It only supports present and dismiss mode. 134 | 135 | ![image](https://github.com/CoderJackyHuang/HYBControllerTransitions/blob/master/modal.gif) 136 | 137 | It is easy to use just like bubble effect transition. Only use an API to finish your job. It looks like below: 138 | 139 | ``` 140 | - (void)onPresent { 141 | HYBBubbleFromBottomController *vc = [[HYBBubbleFromBottomController alloc] init]; 142 | vc.modalPresentationStyle = UIModalPresentationCustom; 143 | 144 | // Remember to own it strongly 145 | // Because delegate is weak reference, and it will be released after out of the function body. 146 | self.bubbleTransition = [[HYBBubbleTransition alloc] initWithPresented:^(UIViewController *presented, UIViewController *presenting, UIViewController *source, HYBBaseTransition *transition) { 147 | // You need to cast type to the real subclass type. 148 | HYBBubbleTransition *bubble = (HYBBubbleTransition *)transition; 149 | 150 | // If you want to use Spring animation, set to YES. 151 | // Default is NO. 152 | // bubble.animatedWithSpring = YES; 153 | bubble.bubbleColor = presented.view.backgroundColor; 154 | 155 | // If one have a navigation bar but another not, you should handle the difference by yourself. 156 | CGPoint center = [self.view viewWithTag:1010].center; 157 | center.y += 64; 158 | 159 | bubble.bubbleStartPoint = center; 160 | } dismissed:^(UIViewController *dismissed, HYBBaseTransition *transition) { 161 | // Do nothing and it is ok here. 162 | // If you really want to do something, here you can set the mode. 163 | // But inside the super class, it is set to be automally. 164 | // So you do this has no meaning. 165 | transition.transitionMode = kHYBTransitionDismiss; 166 | }]; 167 | vc.transitioningDelegate = self.bubbleTransition; 168 | 169 | [self presentViewController:vc animated:YES completion:NULL]; 170 | } 171 | ``` 172 | 173 | For example, AController has an event onPresent, when it is clicked, it will be invoked. 174 | Now, AController needs to present BController, just use the code like above. In BController, 175 | you don't need to do anything. It is easy? 176 | 177 | ##Snapshot support navigation bar or not 178 | 179 | When the presenting view controller has navigation bar, you should set it to YES, and default is YES. 180 | 181 | ``` 182 | /** 183 | * Whether to include navigation bar when take scapshots. 184 | * Default is YES. If NO, it has only the presenting view. 185 | */ 186 | @property (nonatomic, assign) BOOL scapshotIncludingNavigationBar; 187 | ``` 188 | 189 | ##Support tap to dismiss automatically 190 | 191 | If you don't want it to dismiss automatically, just set it to NO. 192 | The default value is YES. 193 | 194 | ``` 195 | /** 196 | * When tap on the presenting view, should it automatically is dismissed. 197 | * 198 | * Default is YES. 199 | */ 200 | @property (nonatomic, assign) BOOL shouldDismissOnTap; 201 | ``` 202 | 203 | For more information, you should see the properties provided, almost every property has default value. 204 | So at many times, you don't need to worry about how to use. 205 | 206 | #Move Push/Pop Transition 207 | 208 | The move transition animation, it looks like the transition animation of KeyNote move transition. 209 | When click a cell or a subview, then push to a view controller and you need animation from the 210 | clicked view to the destination controller. 211 | 212 | It only supports push and pop mode. 213 | 214 | ![image](https://github.com/CoderJackyHuang/HYBControllerTransitions/blob/master/move.gif) 215 | 216 | For the custom push/pop transition animation, it is much harder than present/dismiss. The reason it that, 217 | when a controller was pushed, at this time, we just call init method, but the target view to transition 218 | is nil, so I have to try to solve this problem. 219 | 220 | Now, I use a UIController category to solve it. In the pushed view controller, just set a target view like this: 221 | 222 | ``` 223 | // You must specify a target view with this. 224 | self.hyb_toTargetView = imgView; 225 | ``` 226 | 227 | Now we use just like this: 228 | 229 | ``` 230 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 231 | HYBMoveDetailController *vc = [[HYBMoveDetailController alloc] init]; 232 | HYBGridModel *model = self.datasource[indexPath.item]; 233 | vc.image = model.clipedImage; 234 | 235 | self.transition = [[HYBMoveTransition alloc] initWithPushed:^(UIViewController *fromVC, UIViewController *toVC, HYBBaseTransition *transition) { 236 | HYBMoveTransition *move = (HYBMoveTransition *)transition; 237 | HYBGridCell *cell = (HYBGridCell *)[collectionView cellForItemAtIndexPath:indexPath]; 238 | move.targetClickedView = cell.imageView; 239 | 240 | move.animatedWithSpring = YES; 241 | } poped:^(UIViewController *fromVC, UIViewController *toVC, HYBBaseTransition *transition) { 242 | // Do nothing, unless you really need to. 243 | }]; 244 | 245 | self.navigationController.delegate = self.transition; 246 | [self.navigationController pushViewController:vc animated:YES]; 247 | } 248 | ``` 249 | 250 | Here the example is that, when select a cell, transition from the cell's imageview to the target view (hyb_toTargetView). 251 | 252 | Ok, until now, do you think it is really easy? I believe so! 253 | 254 | #How to install 255 | 256 | If your project supports Pod, just add the following code to you Podfile: 257 | 258 | ``` 259 | pod 'HYBControllerTransitions', '~> 1.0.0' 260 | ``` 261 | 262 | Otherwise, just add the source code HYBControllerTransitions folder to your project. 263 | 264 | 265 | #Thanks 266 | 267 | Thanks to [andreamazz](https://github.com/andreamazz), I learn a lot from him. 268 | 269 | #Contact 270 | 271 | * GITHUB : https://github.com/CoderJackyHuang/ 272 | * Author Blog : http://www.henishuo.com/ 273 | * Email : huangyibiao520@163.com 274 | 275 | #MIT LICENSE 276 | 277 | Copyright (c) 2016 CoderJackyHuang. All rights reserved. 278 | 279 | Permission is hereby granted, free of charge, to any person obtaining a 280 | copy of this software and associated documentation files (the "Software"), 281 | to deal in the Software without restriction, including 282 | without limitation the rights to use, copy, modify, merge, publish, 283 | distribute, sublicense, and/or sell copies of the Software, and to 284 | permit persons to whom the Software is furnished to do so, subject to 285 | the following conditions: 286 | 287 | The above copyright notice and this permission notice shall be included 288 | in all copies or substantial portions of the Software. 289 | 290 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 291 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 292 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 293 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 294 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 295 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 296 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 297 | -------------------------------------------------------------------------------- /biaologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/biaologo.png -------------------------------------------------------------------------------- /bubble.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/bubble.gif -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/logo.png -------------------------------------------------------------------------------- /modal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/modal.gif -------------------------------------------------------------------------------- /move.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/HYBControllerTransitions/a0a54050cb97dd0b50f0723dfcbf8f778f54befe/move.gif --------------------------------------------------------------------------------