Questions tagged [uiviewpropertyanimator]

86 questions
0
votes
1 answer

How to chain animations using key frames

I want the arranged subviews of a stack view to become visible in a cascaded manner, but they're all appearing at the same time: let i = 5 let animation = UIViewPropertyAnimator(duration: 5, timingParameters:…
Kevvv
  • 2,629
  • 19
  • 50
0
votes
0 answers

How to synchronize a UIViewPorpertyAnimator with a UICollectionViewTransitionLayout's animation?

I can update the fractionComplete value of the UIViewPorpertyAnimator and the transitionProgress value of the UICollectionViewTransitionLayout but when I call finishInteractiveTransition on my transition layout and…
0
votes
0 answers

Can I override the visibleCells property of a collectionView from a UIcollectionViewController?

I have a subclass of UICollectionViewController where I override this method: -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView However, when I try to override this method: -(NSArray<__kindof UICollectionViewCell *>…
0
votes
0 answers

Swift - visualEffectView change when from background to foreground

I faced a strange problem. I use UIVisualEffectView and UIViewPropertyAnimator in cell to have a blur effect. However, when the app from background to foreground, the blur effect is changing. Any idea to maintain same effect? code in cell to control…
0
votes
1 answer

UINavigationBar or statusBarHeight -> 0 when CGAffineTransform applied to viewController.view

I am writing an interactive transition via UIViewControllerAnimatedTransitioning. As part of the transition, I apply a CGAffineTransform to the from view controller. As soon as the transform is applied, fromViewController loses its safeAreaInset at…
0
votes
1 answer

UIViewPropertyAnimator not respecting duration and delay parameters

I have a very strange issue in my app. I'm using UIViewPropertyAnimator to animate changing images inside UIImageView. Sounds like trivial task but for some reaso my view ends up changing the image instantly so I end up with images flashing at…
Adam
  • 1,107
  • 1
  • 12
  • 24
0
votes
1 answer

UIViewPropertyAnimator: Hide both TabBar and StatusBar simultaneously (iOS 13)

Trying to hide both TabBar and StatusBar simultaneously and inside the same animation block, I came across an incomprehensible layout behavior. Starting to hide TabBar in the usual way with tabbar item viewcontroller: import UIKit class…
0
votes
1 answer

Responding to touch events during view controller presentation animation

In my iOS app, I have a Toast view that works much like toasts on Android. When a toast is presented, it is displayed in a small region of the screen for a few seconds after which it is automatically dismissed. Toasts have two main…
wstr
  • 860
  • 2
  • 13
  • 22
0
votes
1 answer

UIViewPropertyAnimator doesn’t work as expected

I am trying to animate a UIView and an imageView when the user taps on the UIView. here is my code: // When the user taps on the featured story image view @objc func feturedStoryTapped() { /*featuredStoryView.layer.zPosition = 1 // Hide…
Abdullah Ajmal
  • 335
  • 2
  • 11
0
votes
1 answer

Finish some animations from 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
0
votes
2 answers

How to add animations to an already running animation based on the progress of the latter?

OBJECTIVE Building a complex animation where some actions are triggered based on its progress. QUESTION Is it possible to check the progress of a UIViewPropertyAnimator and add animations when it reaches a given fraction complete that: does not use…
Chris
  • 155
  • 9
0
votes
1 answer

UIViewPropertyAnimator for NSLayoutConstraints makes view disappear

I have a UIViewPropertyAnimator that I set up like this in viewDidAppear: if animator == nil { animator = UIViewPropertyAnimator(duration: 5.0, curve: .easeInOut, animations: { [weak self] in guard let blockSelf = self else { return } …
0
votes
1 answer

Refactoring Swift UIViewPropertyAnimators out of massive view controller

I am trying to refactor my Swift massive view controller which now has >900 lines (too many). How can I separate the creation of my UIViewPropertyAnimators (~100 lines) from my main UIViewController? The thing is that the UIViewPropertyAnimators…
0
votes
1 answer

Would setting a UIView property explicitly stop/finish an existing animation which was started using UIViewPropertyAnimator on the same property

My current level of iOS dev knowledge is that I am still very new to it and in the learning stage. Giving this info so that experts can answer accordingly :) As per the Stanford's course for iOS development it was said that an animation for a UIView…
0
votes
1 answer

UIButton in a view with animation not detecting touch

I'm following a tutorial to create an interactive popup animation (http://www.swiftkickmobile.com/building-better-app-animations-swift-uiviewpropertyanimator/), and now would like to add buttons to the popup rather than have static text as in the…
LSteele
  • 53
  • 6