24 questions
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
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 ...
1
vote
0
answers
52
views
Disable dragging down in Hero animations with NavigationTransitions
I'm using a hero transition and I can't find a way to disable the dragging down dismiss behavior in the second view.
I only want to dismiss the view using a button.
struct HomeView: View {
var ...
0
votes
2
answers
1k
views
SwiftUI Animation: How do I customize the transition animation (fade out THEN fade in)
This code would produce an animation that crossfades the values whenever I change self.myTextString:
// In some View's body method
Text(self.myTextString)
.transition(.opacity)
.animation(.easeInOut(...
1
vote
0
answers
84
views
Overwrite Transition from outside in SwiftUI
I have a badge component with a built-in transition:
public struct BadgeView: View {
...
public var body: some View {
Text(stringValue)
.background(.red)
....
0
votes
1
answer
855
views
How to Animate between views in SwiftUI with a transition effect
I am working on a SwiftUI project. I want to animate the switching between the child views.
For now I have applied the animation inside a child view with onAppear modifier.
I basically have 3 images ...
2
votes
2
answers
548
views
SwiftUI opacity transition fades each views and subviews separately
TLDR: how to render a whole subview before fading it in?
Consider this code snippet: a simple white view and a button that toggles an overlaying FrontView. The FrontView is a superposition of 2 black ...
0
votes
0
answers
111
views
SwiftUI transition not working properly when it contains LazyVGrid
I want a view to come in from the right when pressing a component. The issue is that the Vstack that contains the LazyVGrid slides into the screen after the LazyVGrid components appear (w/o a ...
2
votes
1
answer
484
views
Managing side-effects when SwiftUI's onDisappear not called immediately due to page transition animation
I have a theoretical question about SwiftUI, the timing of the onDisappear() method, and view transitions.
Lets say you have a navigation setup like this:
enum ScreenToShow {
case main, editting, ...
1
vote
0
answers
53
views
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 ...
0
votes
1
answer
979
views
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 ...
0
votes
1
answer
122
views
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?
...
13
votes
2
answers
3k
views
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 ...
1
vote
0
answers
806
views
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 ...
0
votes
1
answer
319
views
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....
0
votes
1
answer
855
views
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.
...
0
votes
1
answer
342
views
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 ...
0
votes
0
answers
286
views
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,...
1
vote
0
answers
231
views
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 ...
1
vote
1
answer
2k
views
How to animate a view transition on a conditional view?
The setup is quite simple:
State/Observable/Computet property, let's call it S1
Views (V1, V2) that depend on S1
The following conditions must hold:
V1 should have a transition for in/out and be ...
4
votes
3
answers
8k
views
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
...
6
votes
2
answers
6k
views
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 ...
0
votes
1
answer
595
views
How to conditionally render a SwiftUI Form with animation using the selection from a Segmented Picker?
I'm trying to conditionally render two Forms based on the selection from a segmented picker. It all works fine when there's no animations, but the moment I add them in, the first Form seems to break.
...
1
vote
1
answer
1k
views
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
------...