Questions tagged [swiftui-geometryeffect]
6 questions
2
votes
1 answer
Matched Geometry Effect with AsyncImage iOS 15
Consider the following example:
struct ContentView: View {
@State var showSplash: Bool = true
@Namespace var animationNamespace
var body: some View {
ZStack {
if showSplash {
GeometryReader {…

Antonio Chan
- 160
- 2
- 10
2
votes
1 answer
SwiftUI: control zIndex on views with matchedGeometryEffect
I am building a custom SegmentedPicker in SwiftUI where the selector adjusts its size to fit the frame of each picker item. I did it already using PreferenceKeys as inspired by this post (Inspecting the View Tree) for uniformly sized items like…

seriouslysupersonic
- 340
- 4
- 8
2
votes
2 answers
SwiftUI: Textfield shake animation when input is not valid
I want to create a shake animation when the User presses the "save"-button and the input is not valid. My first approach is this (to simplify I removed the modifiers and not for this case relevant attributes):
View:
struct CreateDeckView: View {
…

kirkyoyx
- 313
- 2
- 12
1
vote
1 answer
Broken SwiftUI animation when using TabView
I have a working animation in a SwiftUI view, which breaks, when I put that view into a TabView, go to the other tab and come back. How can I fix it?
My view is more complex, but I boiled it down to the following:
import SwiftUI
@main
struct…

Carsten
- 137
- 1
- 6
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
0
votes
0 answers
SwiftUI extend or recalculate VStack height when children views extend
I have a scrollview that holds "cards" with weather details of locations and the cards extend to show more information when tapped.
I have to use a LegacyScrollView so that the bottomsheet that encompasses the scrollview gets dragged down when the…

durkester
- 21
- 4