Skip to content

Releases: HeroTransitions/Hero

0.3.2

16 Feb 18:12
Compare
Choose a tag to compare
  • new properties for specifying default animations
extension UIViewController {
  /// default hero animation type for presenting & dismissing modally
  public var heroModalAnimationType: HeroDefaultAnimationType
}
extension UINavigationController {
  /// default hero animation type for push and pop within the navigation controller
  public var heroNavigationAnimationType: HeroDefaultAnimationType
}
extension UITabBarController {
  /// default hero animation type for switching tabs within the tab bar controller
  public var heroTabBarAnimationType: HeroDefaultAnimationType
}
  • bug fixes #90 #85
  • basic support for animating UIVisualEffectView's effect property in iOS 10

Bug fixes

12 Feb 19:16
Compare
Choose a tag to compare
  • fixed a view order issue #85
  • cleaned up example projects
  • general bug/regression fix for 0.3.0

OverFullScreen Support & Default Transition

11 Feb 02:18
Compare
Choose a tag to compare
  • support .overFullScreen modalPresentationStyle
  • Implement many new default transitions. (fade was the only default transition before this update)
    • .push(direction: Direction)
    • .pull(direction: Direction)
    • .cover(direction: Direction)
    • .uncover(direction: Direction)
    • .slide(direction: Direction)
    • .zoomSlide(direction: Direction)
    • .pageIn(direction: Direction)
    • .pageOut(direction: Direction)
  • a few new modifiers:
    • beginWith(modifiers:[HeroModifier])
    • durationMatchLongest
    • overlay(color:UIColor, opacity:CGFloat)
    • masksToBounds(_ masksToBounds: Bool)

tvOS Support

08 Feb 04:58
Compare
Choose a tag to compare
0.2.0

bump version to 0.2.0

Shadow & Border Animation Support. New zPosition modifier behavior.

07 Feb 19:22
Compare
Choose a tag to compare
  • prepare for tvOS release
  • Add new zPosition modifier that animates zPosition from/to a given value. The old zPosition & zPositionIfMatched modifiers are removed. If you still want to modify the draw order, set the zPosition property on the view's layer before transition. Check the Apple HomePage Example for how to do this.
  • Add shadow and border animation modifiers:
    • shadowPath
    • shadowRadius
    • shadowOpacity
    • shadowColor
    • shadowOffset
    • borderWidth
    • borderColor

No more zPosition needed!!

06 Feb 21:40
Compare
Choose a tag to compare
  • fix a bug where interactive transition won't start when calling update(progress:) with progress = 0
  • Hero can now determine the draw order match more accurately! This eliminate the need for zPosition modifier to be used in most cases.

Bug fixes

05 Feb 05:52
Compare
Choose a tag to compare
  • fix a zPosition regression introduced in 0.1.5

Bug fixes

05 Feb 05:25
Compare
Choose a tag to compare
  • fix a regression introduced in 0.1.5 where animation for matched view might appear inconsistent.

Bug fixes & useScaleBasedSizeChange modifier

05 Feb 05:12
Compare
Choose a tag to compare

0.1.5

  • fix a bug where toViewController's delegate callbacks are not being called

  • fix a bug where fromViewController's delegate callbacks receive incorrect parameters.

  • Add useScaleBasedSizeChange modifier.

    Force Hero use scale based size animation. This will convert all .size modifier into .scale modifier.
    This is to help Hero animate layers that doesn't support bounds animation. Also gives better performance when animating.

Unwind Support & Snapshot Type Modifiers

05 Feb 00:05
Compare
Choose a tag to compare

0.1.4

  • fix a bug where changing orientation doesn't affect previous VC. #60
  • fix a bug where the presented view controller has incorrect frame. #63, #56
  • New snapshot type modifiers:
    • useOptimizedSnapshot

      With this modifier, Hero will create snapshot optimized for different view type when animating.
      For custom views or views with masking, useOptimizedSnapshot might create snapshots
      that appear differently than the actual view.
      In that case, use .useNormalSnapshot or .useSlowRenderSnapshot to disable the optimization.

    • useNormalSnapshot

      Create snapshot using snapshotView(afterScreenUpdates:).

    • useLayerRenderSnapshot

      Create snapshot using layer.render(in: currentContext).
      This is slower than .useNormalSnapshot but gives more accurate snapshot for some views (eg. UIStackView).

    • useNoSnapshot

      Force Hero to not create any snapshot when animating this view. Hence Hero will animate on the view directly.
      This will mess up the view hierarchy. Therefore, view controllers have to rebuild its view structure after the transition finishes.

  • New navigation extension on UIViewController (mainly to support unwinding):
    • func hero_dismissViewController()

      Dismiss the current view controller with animation. Will perform a navigationController.popViewController
      if the current view controller is contained inside a navigationController.

    • func hero_replaceViewController(with:UIViewController)

      Replace the current view controller with another VC on the navigation/modal stack.

    • func hero_unwindToRootViewController()

      Unwind to the root view controller using Hero.

    • func hero_unwindToViewController(_ toViewController:)

      Unwind to a specific view controller using Hero.

    • func hero_unwindToViewController(withSelector: Selector)

      Unwind to a view controller that responds to the given selector using Hero.

    • func hero_unwindToViewController(withClass: AnyClass)

      Unwind to a view controller with given class using Hero.

    • func hero_unwindToViewController(withMatchBlock: (UIViewController) -> Bool)

      Unwind to a view controller that the match block returns true on.