Git Product home page Git Product logo

bcmagictransition's Introduction

BCMagicTransition

BCMagicTransition Build Status Verison Lisence platform

BCMagicTransition

A MagicMove Style Custom UIViewController Transiton

Version 1.0.5

##Adding BCMagicTransition to your project

Requirements

  • ARC only; iOS 7.0+

Get it as:

1) source files
  1. Download the BCMagicTransition repository as a zip file or clone it
  2. Copy the BCMagicTransition files into your Xcode project
2) via Cocoa pods

BCMagicTransition is available on CocoaPods. Just add the following to your project Podfile:

pod 'BCMagicTransition'

If you want to read more about CocoaPods, have a look at this short tutorial.

##Basic usage

#import "UIViewController+BCMagicTransition.h"

@interface MyViewController : <BCMagicTransitionProtocol>


- (void)push
{
    ... ...
       
    [self pushViewController:secondVC fromViews:fromViews toViews:toViews duration:0.3];
}

##Misc

Author: BoyceChang

If you like BCMagicTransition and use it, could you please:

  • star this repo
  • send me some feedback. Thanks!

License

This code is distributed under the terms and conditions of the MIT license.

Contribution guidelines

If you are fixing a bug you discovered, please add also a unit test so I know how exactly to reproduce the bug before merging.

bcmagictransition's People

Contributors

dezinezync avatar kittenyang avatar kronik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bcmagictransition's Issues

Animation parameters

Could you please move animation parameters (delay, usingSpringWithDamping) in BCMagicTransition into properties like you did for duration?

Thanks.

两个VC的数据要一致?

[UIView animateWithDuration:duration delay:0.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{

    toViewController.view.alpha = 1.0;

    for (NSUInteger i = 0; i < [self.fromViews count]; i++) {
        UIView *toView = [self.toViews objectAtIndex:i];
        UIView *fromViewSnapshot = [fromViewSnapshotArray objectAtIndex:i];
        CGRect frame = [containerView convertRect:toView.frame fromView:toView.superview];
        fromViewSnapshot.frame = frame;
    }


} completion:^(BOOL finished) {

    for (NSUInteger i = 0; i < [self.fromViews count]; i++) {
        UIView *toView = [self.toViews objectAtIndex:i];
        UIView *fromView = [self.fromViews objectAtIndex:i];
        UIView *fromViewSnapshot = [fromViewSnapshotArray objectAtIndex:i];
        toView.hidden = NO;
        fromView.hidden = NO;
        [fromViewSnapshot removeFromSuperview];
    }

    [transitionContext completeTransition:![transitionContext transitionWasCancelled]];

}];

这一段写的,如果第二个VC的子视图少于第一个VC的子视图,就会crash

很不错,支持多个view,但是转场的时候有个小问题。

就是fromView 到 toView, 一般toview是一个图片完美的尺寸,但是fromView,可能宽高都不是正常的比例,所以可能设置contentMode是aspectFill,所以转场的时候应该有个scal变化的过程,不然就会有图片先被拉伸或缩放,然后在被明显替换的感觉。希望可以完善下。我自己也在找处理方式。

NavigationItem TitleView Support

Can i transition from navigationItem/navigationbar titleView? I tried but its not transitioning from navigation item/navigationbar, it transitioning from viewcontroller's view from same coordinates of titleView on view. any suggestion/help would be helpful? Thanks.

Popping is not done with animation

The pushing is happening with magic-move animation where as popping is not.

Though in the example project it's working correctly but when I tried it in a new project, popping is not "magic-moving"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.