Questions tagged [swiftui-transition]
17 questions
5
votes
0 answers
SwiftUI: Use Match Geometry Effect When Navigating Between Views Using a Navigation Link
My home view contains a CustomView that opens a detailed view via a NavigationLink when tapped. The detailed view also contains the CustomView, just in a different location.
Can I use the Match Geometry Effect to transition/animate the location of…

yambo
- 1,388
- 1
- 15
- 34
4
votes
2 answers
SwiftUI Transition not happening
I am new to SwiftUI and I am trying to use the .transition, but for some reason no transition happens.
You can see the code below:
View
import SwiftUI
struct ContentView: View {
@ObservedObject var viewModel = ViewModel()
var body: some View…

YanivH
- 539
- 4
- 18
1
vote
0 answers
Animating text change and placement at once in ForEach clause
I have an array that holds some data, that is changing by a button click.
One of the properties of that data is a number.
I want to make a view that will show the numbers in the array and with every button click, they will be resorted by the new…

avivmg
- 369
- 3
- 7
1
vote
0 answers
SwiftUI appear transition doesn't work inside NavigationStack
When I tap on an item in a list, I'd like to transition a view in from the leading edge.
Currently:
When I use ListView by itself, the appear transition works fine.
When I wrap ListView in a NavigationStack, the Image's appear transition does not…

Joshua Breeden
- 1,844
- 1
- 16
- 29
1
vote
2 answers
Disable SwiftUI frame animation on appear
The Goal
Let's say I have a List or a LazyVGrid that displays multiple items nested inside a ScrollView. I use a ForEach view to generate the individual item views:
ForEach(items) { item in
ItemView(item)
}
The items array might be a @State…

Mischa
- 15,816
- 8
- 59
- 117
1
vote
1 answer
SwiftUI: matchedGeometryEffect With Nested Views
I'm facing some dilemma. I like to separate my views for readability . so for example i'm having this kind of structure
MainView ->
--List1
----Items1
--List2
----Items2
----DetailView
------CellView
so cellView having same namespace for…

Mohamed Emad Hegab
- 2,665
- 6
- 39
- 64
0
votes
1 answer
SwiftUI animate the appearance of sub views when expanding parent
I've created this expanding view and it has child views in it that animated in an unexpected way.
In the animation below...
In the "Atlas" section...
The names and image circles stay in place as the parent collapses. The title text moves down but…

Fogmeister
- 76,236
- 42
- 207
- 306
0
votes
1 answer
MatchedGeometryEffect + Image Url
Can someone please explain why MatchedGeometryEffect works with images from the assets folder but not from URLs? And how do we get around this so we can use MatchedGeometryEffect with actual images?
Video with Image Asset (works):…

tintin
- 107
- 2
- 6
0
votes
0 answers
Why is my SwiftUI custom drawer overlay animation jittery when I'm not scrolling in a ScrollView?
Running into some weird behavior with the SwiftUI rendering engine and I'm wondering if anyone can shed some light into it.
For context, I'm creating a custom Drawer View using an overlay. The specific animation in question is the drawer view moving…

sadel
- 31
- 7
0
votes
0 answers
SwiftUI Transition Animation is Applied to Elements Inside View Separately
I'm having a very strange issue with my SwiftUI transitions/animations. My intention is to slide whole views in/out, but it seems like the animation is applied to the elements inside of the view separately as well as the whole view. The result is…

George B
- 918
- 3
- 15
- 24
0
votes
1 answer
Glitch on animation expanding view SwiftUI
I have a search bar view, when the view is Expanding, the magnifying glass will appear as a shadow. How can I remove this?
ToolbarItem(placement: .automatic) {
HStack {
if self.showSearchBar {
HStack {
…

dhaval123
- 107
- 11
0
votes
1 answer
toolbar animation on extending search bar does not work swiftui
I want to animate the extending search bar. When I press the search button, I want to extend the search bar to left, and when I close the search text field, to collapse to right.
ToolbarItem(placement: .automatic) {
…

dhaval123
- 107
- 11
0
votes
0 answers
transition on button without toggle or withAnimation swiftui
I am trying to add a transition to a button but without using the .toggle() or withAnimation
The way that I manage the hide and show the button its with incrementing myValue.
var body: some View{
ZStack{
…

dhaval123
- 107
- 11
0
votes
1 answer
Transition zoom at Text in Swiftui when a previous fade in transition ends for the same Text
I have two texts in a SwiftUI View and two @State wrappers. When the view appears the first text is visible and the second is not. After a few seconds the first text fadeouts and the second text should fade in at the same time. So far so good. Now…

stefanosn
- 3,264
- 10
- 53
- 79
0
votes
0 answers
swiftUI geometryEffect animation
I'm practicing swiftui geometryEffect by applying it to a transition from view to another. The first view has three circles with different colors, the user selects a color by tapping the desired color, and clicks "next" to go to second view which…

abs8090
- 111
- 2
- 9