|
I have an app that Im trying to write a custom launch screen for. The AppTabView gets called in the view that conforms to App. As you can see if showTabView is false it shows the LaunchScreen and that view after a few seconds will toggle showTabView and then show the TabView. All that works fine. The problem is that in each of the views surrounded by NavigationViews all the NavigationLinks dont animate to the view (slide in). If I remove all the code and just show TabView then everything works fine. I cannot seem to figure out why. I have tried adding tags to the NavigationLinks and that doesnt seem to work. Can anyone tell me why showing a launch screen this way would break all the navigation links.
|
|
I tried reproducing your problem (with Xcode 13.4.1) on simulator and devices (iOS 15.5) and my What is your test setup? Are you perhaps expecting something different? For example that switching the tabs is animated? See my reproduced code im my Gist with a video showing proper animations https://gist.github.com/pd95/d78ecdb8b64342a29bb325af0b54c222 |
|
@pd95 I looked at your gist and the video. I do notice that your NavigationLinks are inside a Form. When you get into my code the NavigationLinks are not inside forms. Its weird though, that if I remove all the LaunchScreen stuff, the if statements and only have the TabView with its modifiers then all the NavigationLinks inside the other views, whether that view is in a VStack, HStack or ZStack all seem to work just fine. The view its navigating to slides in nice and easy. I will go and try putting the views that have Nav Links in them inside a Form. Question, do navigation links have to be inside a form? I didn't think so. But I could be wrong. Thanks Taz |
|
@pd95 Unfortunately, I cannot put all my Nav Links inside Forms. The Links are inside a List and you cannot show a list in a form. So, Im stuck here. I do have a settings page thats a form and my nav link works there just fine. All the others that are inside List do not work. You tap them and they just pop the view on instead of slide it in. |
|
|
|
EventsView:
The EventsView calls the view EventsListView which is where the Nav Link is
|
|
Has anyone any idea why my Nav Links are not transitioning? I'm completely stuck on this one. Doesn't make sense. When you tap one the view just pops in instead of sliding in. Earlier I posted my main view and then the view that has the link in it. Any thoughts would be appreciated. Taz |
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.