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
13
votes
1 answer

Animated UIWebView does not respond to touches during animation

At the moment, I'm animating a UIWebView from the bottom of the screen to the top. As the UIWebView animates upwards it becomes untouchable for 50-80% of the duration time. If I tap the UIWebviews ending destination, or model layer, the taps are…
Adam Cooper
  • 867
  • 1
  • 6
  • 23
8
votes
1 answer

When is it appropriate to use Core Animation over UIView animation in common cases

This is related to a lot of little bugs that might stereotypically be considered minor by one person, but major by another. What I've noticed more and more, is that when using all flavors a UIView animateWithDuration:, it actually modifies things…
8
votes
0 answers

iOS Google Maps SDK new icon View animations

According to the documentation regarding the GMSMarker new property iconView: The view behaves as if clipsToBounds is set to YES, regardless of its actual value So there is no way of changing that clipsToBounds to NO? How are animations supposed…
apinho
  • 2,235
  • 3
  • 25
  • 39
7
votes
2 answers

SwiftUI: Animation Inside NavigationView

I am trying to create a simple animation in SwiftUI. It is basically a rectangle that changes its frame, while staying in the center of the parent view. struct ContentView: View { var body: some View { NavigationView { VStack…
crom87
  • 1,141
  • 9
  • 18
7
votes
1 answer

iOS stop animateWithDuration before completion

I have a CollectionView and I want to create an animation inside the CollectionViewCell selected by the user. I chose to use animateKeyframesWithDuration because I want to create a custom animation step by step. My code looks like this: func…
razvan
  • 133
  • 4
6
votes
0 answers

Custom Transition Animation with User Interaction Enabled

I have a custom full screen alert with a low alpha background. The default modal animation slides from bottom to top. I would like the alert to fade-in and fade-out. I am UIViewControllerTransitioningDelegate + UIViewControllerAnimatedTransitioning.…
sudolibre
  • 61
  • 3
5
votes
3 answers

Fix odd DatePicker animation behaviour in SwiftUI form

I'm getting some odd animation behaviour with DatePickers in a SwiftUI form. A picture is worth a thousand words, so I'm sure a video is worth a million words: https://i.stack.imgur.com/bNrTK.jpg I'm trying to get the date picker to expand and then…
Sam
  • 6,616
  • 8
  • 35
  • 64
5
votes
1 answer

Using the UIViewControllerTransitionCoordinator animateAlongsideTransition method

I have a ViewController lets say ViewControllerA and a ViewController lets say ViewControllerB. ViewControllerB is modally presented from ViewControllerA using a custom transition. In ViewControllerA: -(void)buttonClicked... { ViewControllerB *…
newbie
  • 1,049
  • 5
  • 15
  • 29
4
votes
2 answers

SwiftUI Ripple Effect Animation

I'm working on creating a ripple effect in SwiftUI similar to the one here. Here is what I have so far: import SwiftUI // MARK: - Ripple struct Ripple: ViewModifier { // MARK: Lifecycle init(rippleColor: Color) { self.rippleColor…
RPK
  • 1,830
  • 14
  • 30
4
votes
1 answer

Transition is not working with ForEach nested in List with data from Core Data

Why this title? Because List, ForEach and CoreData are the three major culprits in my opinion...well, if not simply .transition() itself. What I want Basically I want, say, a list of tasks stored in the Core Data, and on tapping a task, it just…
XYZ
  • 43
  • 4
4
votes
1 answer

iOS 13 Alternative to 'setAnimationCurve'

with iOS 13 Apple deprecated a lot of functions that I've been using in my app. For most of them, there are already alternatives well explained on StackOverflow - however not for 'setAnimationCurve'. 'setAnimationCurve' was deprecated in iOS 13.0:…
linus_hologram
  • 1,595
  • 13
  • 38
4
votes
1 answer

Custom unwind segue animation display issue

I'm doing my first custom segue animations. What I want is to have a list view that when I select on a row, instead of sliding in from the side, it expands in place from the row selected. Something like: So the user selects the green row, which…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
4
votes
1 answer

UiView.animateWithDuration Not Animating Swift

I am trying to animate show/hide of search bar using below code (The search bar should come from left and expand to right within 1-2 seconds). However, it doesn't animate and searchBar is immediately shown no matter how much time I put. I noticed…
3
votes
3 answers

Moving dots in Text view (loading animation) Swiftui

I want to make Text View with dots that increase and decrease over time. Now it looks like that: but it looks twitchy and smudged. And also the text itself is shifted every time. How to get rid of it? Here is my code: struct TextViewTest: View…
Dobry Siabar
  • 53
  • 1
  • 3
3
votes
1 answer

Dynamic Island SwiftUI Animations

How can I implement swiftUI animations on a dynamic island icon? I want to do this: DynamicIsland() { ... } compactLeading: { Image("my-icon").shineEffect() } compactTrailing: { Image("my-icon") } Where in shine effect I start the animation…
annaoomph
  • 552
  • 1
  • 4
  • 22
1
2 3
12 13