Beagle v1.7 is no longer actively maintained. The documented version you are viewing may contain deprecated functionality. For up-to-date documentation, see the latest version .
On BeagleNavigation
protocol there is a defaultAnimation
variable that allows you to change the transition animation of your application and also another function that deals with the navigate actions types and define their behaviour.
Use the default implementation, but only if it is necessary. This implementation can be replaced by a class, according to the protocol above.
On BeagleNavigation Protocol there is a defaultAnimation variable that determines how the view is animated onscreen when it is presented.
It allows you to change transitions for pushing and popping view controllers with pushTransition
and popTransition
variables. You can also change your modalPresentationStyle
and modalTransitionStyle
.
public struct BeagleNavigatorAnimation {
var pushTransition: Transition?
var popTransition: Transition?
var modalPresentationStyle: UIModalPresentationStyle?
var modalTransitionStyle: UIModalTransitionStyle
}
In the structure below, there are types of CATransition
where you can transition between a layer’s states by creating and adding a CATransition
object to it.
public struct Transition {
var type: CATransitionType
var subtype: CATransitionSubtype?
var duration: Double
}
In the example below, the default apps push transition and modalPresentationStyle were changed.
let animation = BeagleNavigatorAnimation(
pushTransition: .init(
type: .fade,
subtype: .fromRight,
duration: 1.0),
modalPresentationStyle: .formSheet)
let dependencies = BeagleDependencies()
dependencies.navigation.defaultAnimation = animation
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.