30 questions
1
vote
1
answer
77
views
SwiftUI: matchedGeometryEffect and clipShape Animation Bug
Say I have a container view that I use to apply consistent styling to various contained views.
struct FormattedContainer<Content: View>: View {
let content: Content
init(@ViewBuilder ...
0
votes
2
answers
60
views
How to define and use a @Namespace var outside a View
Is it possible at all to define a @Namespace var outside a View and pass it in to views. For example, to do this in the State class?
I have included a baseline code that has matched animations. I have ...
-1
votes
1
answer
117
views
Matched Geometry Effect animation bug
I have a basic view that tries to animate a single image to a tab view of images. I am encountering some animation issues using the code below. Also in the bottom scroll view, the images are view ...
1
vote
1
answer
65
views
How to fix Z-stack views reordering while using MatchedGeometryEffect?
I wanted to create a simple custom segmented control component with animation similar to native component. I have seen lots of people using matchedGeometryEffect for this, however when I implemented ...
0
votes
1
answer
50
views
No matchedGeometryEffect in Switch grid style in SwiftUI
I'm trying to implement a SwiftUI view that switches between different grid styles (list, row, grid) using a SwitchMode enum. I want to use matchedGeometryEffect to animate the transition between ...
0
votes
1
answer
634
views
Assistance understanding SwiftUI view hierarchy and .zIndex
I'm trying to learn SwiftUI and am getting along pretty well, but I've come across an issue with .zIndex / view placement which the tutorials and AI answers can't seem to help me with. Huge thanks to ...
-1
votes
1
answer
169
views
Photos App-style .matchedGeometryEffect working unexpectedly
I am trying to create a Photos App-style grid with a popout effect. I want the effect to look exactly like the Photos App, wherein the source image is scaled to fill the square frame, and the expanded ...
0
votes
2
answers
87
views
SwiftUI move image between pages animation
I've been trying for days but I couldn't find a solution. My goal is to move the Image from one location to another. But I don't want the image to only move up and down while moving it. I want it to ...
0
votes
1
answer
100
views
.matchedGeometryEffect doesn't work with ForEach
I am trying to display a ForEach of items, that could transition into like a fake sheet view, but I don't know what I am doing wrong, because the ForEach just displays every item on top of each other.
...
0
votes
1
answer
88
views
Matched geometry effect one way
I'm using matched geometry effect to animate selection of an item and it works nicely but I'm having an issue that I only want it to animate one way when selecting. It's a bit hard to explain visually ...
2
votes
1
answer
903
views
In Swift, how can I matchedGeometryEffect for a clipped() image without it glitching?
I'm familiar with how matched geometry works on normal objects or elements but it becomes glitchy and confusing when we focus on images. The code below is as far as I've gotten. It performs well when ...
0
votes
0
answers
118
views
Make view with matchedGeometryEffect claim space in ScrollView
I have multiple views in a ScrollView and I want one of them to size itself by the dimensions of another view. Luckily .matchedGeometryEffect offers the option to only match the size between views ...
0
votes
2
answers
987
views
SwiftUI .matchGeometryEffect not working smoothly
I've been trying for sometime now to figure out why the .matchGeometryEffect is not transitioning smoothly in my use case. The state change speed is not consistent, growing quicker and going back ...
0
votes
1
answer
435
views
Why am I encountering "Multiple inserted views in matched geometry group" for a conditional render?
I have two views and am trying to Matched Geometry animate from one view where the geometry is deep to an overlay view. However, I keep getting an error in the console, claiming there are two ...
0
votes
0
answers
81
views
Height resetting to 0 first when using a .matchedGeometryEffect() transition in SwiftUI
I'm struggling to understand why .matchedGeometryEffect() is behaving this way:
I'm trying to animate a tab's height to different heights, based on its content. To do so I'm using ....