Questions tagged [ios-animations]

Animations provide fluid visual transitions between different states of your user interface.

Animations

Animations provide fluid visual transitions between different states of your user interface. In iOS, animations are used extensively to reposition views, change their size, remove them from view hierarchies, and hide them. You might use animations to convey feedback to the user or to implement interesting visual effects.

In iOS, creating sophisticated animations does not require you to write any drawing code. All of the animation techniques described in this chapter use the built-in support provided by Core Animation. All you have to do is trigger the animation and let Core Animation handle the rendering of individual frames. This makes creating sophisticated animations very easy with only a few lines of code.

Official Documentation

188 questions
3
votes
0 answers

Expand Swiftui view to cover screen

Hello I'm looking to replicate a swiftui animation that I see around specifically to animate a view (like a button) from where it is in the hierarchy to full screen and then back. Here is a demo https://i.stack.imgur.com/WmDfn.jpg What I've tried I…
austin
  • 405
  • 4
  • 12
3
votes
0 answers

Custom IOS transition showing white blank screen while dismissing view controller

I am creating Hero animation like IOS app store click on the app to open detail page , I was able to create presentation animation without any issue but when I tried to dismiss the animation it shows a white background screen for some time, I tried…
Ajay Beniwal
  • 18,857
  • 9
  • 81
  • 99
3
votes
1 answer

UIView with auto layout constraints "jumps" before transform animation

I have a UIView constrained with Auto Layout. It's centered and has a constraint for Width and Height. When it appears, I'm applying a rotation transform to it. When I hit that animation button, I want it to animate to a point higher on the screen,…
bpapa
  • 21,409
  • 25
  • 99
  • 147
3
votes
2 answers

Auto-Layout animation takes center as anchoring point

I have an height animation based on constraints. However when animation starts it takes view's center as anchoring point not the top. I want it to animate as fixed top and shrinking from the bottom. Sorry for my English not a native speaker. my…
3
votes
1 answer

Jittery Search Bar Cancel / End Editing Animation

I have a SearchBar and am trying to make it behave like one you'd see in the iPhone settings. When it's tapped the animation smoothly transitions the magnifying glass from the middle of the search bar to the left side of the search bar & smoothly…
Trev14
  • 3,626
  • 2
  • 31
  • 40
3
votes
1 answer

UITableView damping animation and layout constraints

I'm trying to animate UITableView to act like a dropdownMenu by using its height constraint and UIView.animateWithDamping(..) block. I'm occuring weird problem with white background under tableView. iPhone Simulator showing the problem I have…
2
votes
1 answer

Animations on iOS16 WidgetKit

I want to create a iOS Clock Widget where seconds move in a jumping motion, and the animation effect is shown in the following image. The second hand bouncing every second. I know _ClockHandRotationEffect can achieve second rotation animation, but…
mars
  • 109
  • 5
  • 21
2
votes
2 answers

Snake like animation on the rounded rectangle path

I'm trying to implement an animation similar to what you can see on the image: I'm using the Core Graphics and Core Animation with UIBezierPath to achieve this, but the problem seems to be with the start and the end of the CGPath (strokeStart…
lawicko
  • 7,246
  • 3
  • 37
  • 49
2
votes
2 answers

Animating row change in a List with SwiftUI

Focusing on comprehending the underlying concept of the various animation behaviors, I am interested of programmatically animate the change of a row in a List. I am able to achieve it in the following example: struct First: View { @State var items…
OhadM
  • 4,687
  • 1
  • 47
  • 57
2
votes
0 answers

LazyVGrid content does not conform to transition animation

I have a simple code where I have a button on the screen. When the button is pressed a red rectangle with some buttons should slide/transition from bottom of the screen and appear. The problem is that the background (the red rectangle) is sliding…
2
votes
1 answer

Animation doesn't work on AnyTransition SwiftUI

I'm currently using SwiftUI on a function where a list of images change automatically with opacity animation for each image. While I've currently managed to get a transition going, the opacity animation does not work no matter what I try. Could…
Learner_15
  • 399
  • 2
  • 11
2
votes
0 answers

Why does changing ModelEntity scale seem to affect position as well?

I have been playing with session(session: didUpdate frame: ARFrame) and trying to make a ModelEntity move and scale at the same time. I start the movement by calling: model.move(to: [-1, 0, 0], relativeTo: model.anchor, duration: 1) Then in the…
mabarif
  • 241
  • 2
  • 10
2
votes
2 answers

RealityKit: change the scale of a ModelEntity without changing its position

I have an ModelEntity animation that move from point A to point B and takes a while to complete. When the user taps on the ModelEntity I would like to add a shrinking animation to the ModelEntity as well. I tried adding the scale animation directly…
mabarif
  • 241
  • 2
  • 10
2
votes
1 answer

How can I update this custom Picker animation and transition to iOS 15?

The code beloew works well up to iOS 15, but now I'm getting the warning 'animation' was deprecated in iOS 15.0: Use withAnimation or animation(_:value:) instead. Looking around, it appears I should use .animation(_, value: someValue) - that does…
Rillieux
  • 587
  • 9
  • 23
2
votes
1 answer

Is there a way to change animation speed?

In iOS swift I use HeroTransition library to make animations. Is there a way to change animation speed? let vc = DODViewController.init(with: project , projectType: .doodle, needToMapFolderIndex: nil) let heroId =…
isuru
  • 3,385
  • 4
  • 27
  • 62
1
2
3
12 13