Closed d0hnj0e closed 4 years ago
@d0hnj0e does this happen on viewDidLoad()
?
@marcosgriselli, yes. In viewDidLoad()
I call a function which executes the code from above; moving the code directly to viewDidLoad()
does not change the fact.
@d0hnj0e and it happens when pushing a UIViewController
on a UINavigationController
, right?
No, the segue is from an UIViewController
to another UIViewController
:
Got it, I'll review it in the upcoming days.
Thanks, Marcos! Very kind!
I solved the problem, @marcosgriselli:
If you present a UIViewController
with any segue, you must not call the animation functions within viewDidLoad()
but rather in viewDidLayoutSubviews()
. The following code executes flawlessly and shows the animation as it should:
override func viewDidLayoutSubviews() {
let fromAnimation = AnimationType.from(direction: .left, offset: 80)
headingTextLabel.animate(animations: [fromAnimation], delay: 0, duration: 0.5)
mainTextView.animate(animations: [fromAnimation], delay: 0, duration: 0.5)
continueButton.animate(animations: [fromAnimation], delay: 0.2, duration: 0.5)
}
Maybe you could briefly update the README.md
accordingly. :)
And: Thanks for your great work with this library!
Thanks @d0hnj0e! I'll make sure to add a presentation example on the demo app. I'll close the issue.
Expected Behavior
Animation should work in every VC
Actual Behavior
Animation only works in initial VC
Steps to Reproduce the Problem
Creating two VCs, connecting them, using a code like
and see the animation only on the initial VC
Specifications