Questions tagged [uiviewpropertyanimator]

86 questions
2
votes
1 answer

UIViewControllerAnimatedTransitioning: multiple calls to interruptibleAnimator?

I just spent the last few hours tracking down a bug that happened to be located in a transition driver object, where the interruptibleAnimator method was called several times, where: a UIViewPropertyAnimator completion closure contained a reference…
Herakleis
  • 483
  • 5
  • 18
2
votes
1 answer

UIViewPropertyAnimator animating movement depending on pan direction

Hi guys im trying to make my animation go to either side depending on which way the user is panning, but it does not work and i cannot figure out whats wrong. The gesture was working correctly when I was working with only one direction, but when I…
Lord Fresh
  • 586
  • 6
  • 15
1
vote
0 answers

ScrollView having subviews with buttons are not clickable when UIViewPropertyAnimator is running

I'm doing a slide animation using scrollView and UIViewPropertyAnimator.runningPropertyAnimator but I'm facing issue that the subviews buttons are not clickable, to verify that it is from the animation I stoped the animation code and the buttons…
ANeme
  • 511
  • 2
  • 15
1
vote
1 answer

Did we always need to retain an animation in a persistent property?

Currently i am reading very interesting book of Matt Neuburg. But i stuck on this moment: In the simplest case, you’ll just launch the animation and stand back, as I demonstrated earlier: let anim = UIViewPropertyAnimator(duration: 1, curve:…
Ninja
  • 157
  • 5
  • 22
1
vote
2 answers

How to derive CASpringAnimation properties from simpler UISpringTimingParameter initializer?

I have a spring animation curve specified using a UISpringTimingParameters with damping ratio and initial velocity, and I use it with a UIViewPropertyAnimator with its duration specified. Elsewhere in my app, I need to express the same animation…
Tom Hamming
  • 9,484
  • 9
  • 66
  • 131
1
vote
1 answer

Restart UIViewPropertyAnimator when returning to the App

I just built an iOS app with a simple animation. But I am struggling with the UIViewPropertyAnimator. I want to animate a button and this works well until I leave the app (pressing home button) and going back to it. The animation has stopped and…
Henrik
  • 13
  • 2
1
vote
1 answer

UIViewPropertyAnimator position reset

I have a slight problem. I'm trying to create animated progress bar like Instagram does. It works correctly in all cases except when I want to present previous item. Breakpoints say that when I switch to previous item, UIViewPropertyAnimator…
1
vote
1 answer

How do you sequentially animate an array of image views in Swift?

I've been trying to figure this out for a while to no avail. Basically, I have an array of UIImageViews that I want to animate 1-by-1 in order. Right now, they all animate correctly but simultaneously. Additionally, I want the code at the bottom to…
Messi10
  • 13
  • 2
1
vote
0 answers

Finish some animations of UIViewPropertyAnimator earlier

I search for a way to add some animations to an UIViewPropertyAnimator which finishing earlier then others. UIViewPropertyAnimator have for example a method where you can add animations with a delay animator.addAnimations(animation: (()-> Void),…
kuemme01
  • 423
  • 5
  • 15
1
vote
0 answers

Swift Dynamic animation followed by property animator

I have an animation where I use a push animation, then a snap animation using UIDynamicBehavior, and then I finish with a property behavior: for card in selectedCards { removeCard(card: card) } private func removeCard(card: Card) { …
Darkisa
  • 1,215
  • 2
  • 13
  • 26
1
vote
1 answer

animator.startAnimation -- What does this warning mean?

I'm trying to learn how to use UIViewPropertyAnimator in objc. I made a simple test app with an object called 'blueBox'. I want to vary the properties of blueBox. I declare 'animator' outside of @implementation ... @end: UIViewPropertyAnimator…
RobertL
  • 11,814
  • 10
  • 35
  • 41
1
vote
0 answers

dont move again when i restart a UIViewPropertyAnimation

override func viewDidLoad() { super.viewDidLoad() animator = UIViewPropertyAnimator(duration: 10, curve: .linear, animations: { var frame = self.button.frame frame.origin.y = frame.origin.y + 100 self.button.frame =…
chunxi
  • 9
  • 2
1
vote
1 answer

Observing UIViewPropertyAnimator is running issue

From Apple Documents pausesoncompletion Because the completion handler is not called when this property is true, you cannot use the animator's completion handler to determine when the animations have finished running. Instead, you determine when…
1
vote
3 answers

Repeating and reversing an animation multiple times using UIViewPropertyAnimator

I am trying to have my animation ease the screen from black to white to black again and repeat that a certain amount of times. Currently with the code I have the animation eases from black to white then jumps back to black. Is there anyway to run an…
Ben Cavenagh
  • 523
  • 4
  • 16
1
vote
1 answer

How to create animation which animate repeatedly with UIViewPropertyAnimator?

with the UIView.animate: method , we can configure the options and make it [.autoreverse,.repeat]. here is a simple Animation: @IBOutlet weak var v1: UIView! UIView.animate(withDuration: 3, delay: 0, options: [.autoreverse,.repeat], animations:…
Shadi Asi
  • 147
  • 11