docs/Classes/HeroExtension.html
public class HeroExtension<Base>
Undocumented
`
base
`
Undocumented
Swift
public let base: Base
Base: UIView`
id
`
ID is the identifier for the view. When doing a transition between two view controllers, Hero will search through all the subviews for both view controllers and matches views with the same heroID.
Whenever a pair is discovered, Hero will automatically transit the views from source state to the destination state.
Swift
var id: String? { get set }
`
isEnabled
`
isEnabled allows to specify whether a view and its subviews should be consider for animations. If true, Hero will search through all the subviews for heroIds and modifiers. Defaults to true
Swift
var isEnabled: Bool { get set }
`
isEnabledForSubviews
`
isEnabledForSubviews allows to specify whether a view’s subviews should be consider for animations. If true, Hero will search through all the subviews for heroIds and modifiers. Defaults to true
Swift
var isEnabledForSubviews: Bool { get set }
`
modifiers
`
Use modifiers to specify animations alongside the main transition. Checkout HeroModifier.swift for available modifiers.
Swift
var modifiers: [HeroModifier]? { get set }
`
modifierString
`
modifierString** provides another way to set modifiers. It can be assigned through storyboard.
Swift
var modifierString: String? { get set }
Base: UIViewController`
modalAnimationType
`
default hero animation type for presenting & dismissing modally
Swift
var modalAnimationType: HeroDefaultAnimationType { get set }
`
modalAnimationTypeString
`
Undocumented
Swift
var modalAnimationTypeString: String? { get set }
`
isEnabled
`
Undocumented
Swift
var isEnabled: Bool { get set }
Base: UINavigationController`
navigationAnimationType
`
default hero animation type for push and pop within the navigation controller
Swift
var navigationAnimationType: HeroDefaultAnimationType { get set }
`
navigationAnimationTypeString
`
Undocumented
Swift
var navigationAnimationTypeString: String? { get set }
Base: UITabBarController`
tabBarAnimationType
`
default hero animation type for switching tabs within the tab bar controller
Swift
var tabBarAnimationType: HeroDefaultAnimationType { get set }
`
tabBarAnimationTypeString
`
Undocumented
Swift
var tabBarAnimationTypeString: String? { get set }
Base: UIViewController`
dismissViewController(completion:)
`
Dismiss the current view controller with animation. Will perform a navigationController.popViewController if the current view controller is contained inside a navigationController
Swift
func dismissViewController(completion: (() -> Void)? = nil)
`
unwindToRootViewController()
`
Unwind to the root view controller using Hero
Swift
func unwindToRootViewController()
`
unwindToViewController(_:)
`
Unwind to a specific view controller using Hero
Swift
func unwindToViewController(_ toViewController: UIViewController)
`
unwindToViewController(withSelector:)
`
Undocumented
Swift
func unwindToViewController(withSelector: Selector)
`
unwindToViewController(withClass:)
`
Unwind to a view controller with given class using Hero
Swift
func unwindToViewController(withClass: AnyClass)
`
unwindToViewController(withMatchBlock:)
`
Unwind to a view controller that the matchBlock returns true on.
Swift
func unwindToViewController(withMatchBlock: (UIViewController) -> Bool)
`
replaceViewController(with:completion:)
`
Replace the current view controller with another VC on the navigation/modal/root view of UIWindow stack.
Swift
func replaceViewController(with next: UIViewController, completion: (() -> Void)? = nil)