271 questions
0 votes
1 answer
39 views
Animate a view's transition differently from its modifiers (in SwiftUI)
I'm writing a SwiftUI app in which I'd like to have objects animate slowly when they change location and quickly when they disappear. I can't figure out how to achieve that. Take this example. There ...
0 votes
1 answer
76 views
Custom bottom sheet shows brief flicker/fade of underlying view when expanding/collapsing (iOS 15)
I’m building a reusable custom bottom sheet component in SwiftUI because my app supports iOS 15, so I can’t use .sheet with detents yet. Functionally everything works the sheet opens and closes but I’...
0 votes
2 answers
86 views
Prevent matchedGeometryEffect from animating during transition
I am trying to present a modal that contains an element using matchedGeometryEffect. I’ve run into a problem — if I animate the transition, the matchedGeometryEffect animates as well. I’d like it not ...
0 votes
0 answers
44 views
List animations broken in macOS Sequoia but work in Sonoma (FetchRequest, Picker filters)
In macOS Sonoma, my SwiftUI code performs smooth, expected animations when List contents change — both when using @FetchRequest with a changing predicate and when filtering manually via Picker ...
0 votes
0 answers
17 views
Concurrent animations in SwiftUI [duplicate]
I have a view that can be in two different positions depending on the state of the rest of the app. The same view can contain either two or three buttons depending on some state that is determined ...
1 vote
1 answer
101 views
SwiftUI PhaseAnimator make a view jitter in sheet presentation
First here's a block of code that reproduce the issue: import SwiftUI struct CustomAnimation: ViewModifier { @State private var isAnimated: Bool = false func body(content: Content) -> ...
0 votes
1 answer
119 views
Animating items in a SwiftUI list only at first appearance
I have a simple SwiftData app. Whenever ImageLibraryView appeared, there were microhangs because images inside each ThumbnailView were being loaded synchronously. So I solved that by loading the ...
0 votes
0 answers
44 views
Append item in list with slide animation
I have one view named CongratulationOverlay, and in bottom there is one horizontal list. Now I want that overlay view to slide in to the horizontal list as I am appending that into list. and ...
-3 votes
1 answer
98 views
How to animate substring in a Text?
Currently, I am using multiple Texts in a horizontal stackview, to achieve animation of substring. As you can see in the above animation, the text - conversation - meeting - lecture are animated. ...
2 votes
2 answers
106 views
MatchGeometryEffect not work properly while return come back to start position
I am working on geometryMatchEffect and struggled on one point. In my case, when tap on a item, the item should be fly to page of the top and other items should remain backside. And then when tap on ...
0 votes
0 answers
162 views
How does one animate an annotation on a SwiftUI Mapkit Map?
I'm attempting to animate an array of annotations on a SwiftUI MapKit Map and not getting the behavior I'm expecting. I see lots of examples on how to animate the map camera, etc, and even a few on ...
0 votes
1 answer
149 views
How to create complex series of animation in SwiftUI
How can "complex" animations be composed in SwiftUI? Where complex means that the complete animation is composed out of multiple sub-animation. Example I am working on migrating an existing ...
-1 votes
1 answer
156 views
SwiftUI animation - Understanding how state changes are handled / animated
I am struggeling to understand how exactly SwiftUI animates view changes in a concrete example I am working on. TL;DR The description of the problem and the code is quite long. The basic question is: ...
0 votes
2 answers
120 views
Is it possible use animation properties (current value, speed) of withAnimation block to change other values?
The simple code below moves the text by updating the @State var offset within a withAnimation block. struct ContentView: View { @State var offset: CGFloat = 0 var body: some View { ...
1 vote
0 answers
129 views
How can I make the legend of a pie chart remain static during the chart’s animation when using 'sectormark'
I was trying to make the animation of a pie chart, I was trying to make the appear layout animation. (As the user navigates to the page, the pie chart will animate, starting from the 12 o'clock ...