github HeroTransitions/Hero 1.0.0-alpha.1

latest releases: 1.6.3, 1.6.2, 1.6.1...
pre-release6 years ago

Sorry guys for the inactivity with this project. I have been having some other commitments. From now on, I will start maintaining and updating it more often.

So to prepare for stable release 1.0, there will be a few alpha versions. I will start to clean up issues and start monitor new ones. Feel free to submit anything you have encountered while using the new versions.

New Features

  • .useNoSnapshot will now try to insert the view back to the view hierarchy once the transition completes. So you don't need to manually insert it back.

    • Note: for views that have collection view or table view as the superview, Hero might not be able to insert it into the correct subview index since the collection view and table view might have altered their subviews during the transition.
  • .useNoSnapshot will now animate subview layout changes. Very convenient when you want your custom layout be animated during the transition.

  • Added .whenXXX modifiers to make hero more declaritive.

    • instead of conforming to HeroViewControllerDelegate, you can now use .whenPresenting, .whenDismissing, .whenApearing, .whenDisapearing, .whenMatched, or your own conditions with .when
  • Added isHeroEnabledForSubviews property on UIView. Setting this to true will let Hero skip over the subview tree. This saves a lot of computation time when the subview tree is complex.

  • Better support iOS custom keyboard

  • Better support UIVisualEffectView

  • You can now create your own instance of HeroTransition instead of using isHeroEnabled & Hero.shared.

    • just create an instance of HeroTransition and assign it to the transitionDelegate property of your view controller.
  • Added viewOrderingStrategy property to HeroTransition which allow you to customize which view controller should be inserted first during the transition.

  • Added isUserInteractionEnabled property to HeroTransition which allow you to enable user interaction during the transition.

    • Note: by default, Hero will create snapshot of your views and use them for animation. They don't have the same event handler as your own views. So to enable user interaction, you have to apply .useNoSnapshot modifier to the views that you want to enabled user interaction. Also keep in mind that Hero can be in any state when you are handling user interaction. If you want to trigger a new transition, besure to call cancel(animated: false) or finish(animated: false) before starting the new transition.
  • The following methods on Hero is removed in favor of creating your custom HeroTransition object

    • func disableDefaultAnimationForNextTransition()
    • func setDefaultAnimationForNextTransition(_ animation: HeroDefaultAnimationType)
    • func setContainerColorForNextTransition(_ color: UIColor?)

Bug fixes:

  • fix the ghosting effect where the source view and target view animates at different rate
  • fix tab bar crashes and inconsistency when tapping too fast.

Future Roadmap:

  1. Custom snapshot view
  2. Masking support

Don't miss a new Hero release

NewReleases is sending notifications on new releases.