I'm going to buy your package for navigation. I like how is simple on the implementation, but I would like to know how can we pass data between views? I read a comment below about EnviromentObject and heard from the tutorial video that you don't recommend to use associated values for enum, but how can pass data in a viewmodel using your package? How can we handle navigation from a viewmodel with your package?
Hey there. There are demo Xcode projects with the product where you can learn how to move data between views. Next check out AI in Xcode: Elevate Your App Development to the Next Level 👇 ua-cam.com/video/L7OI_o1IN3A/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
@@rebeloper Hey. Thanks for the great library. I'm following your demo and realized that AppleViewModel initialized once again when any sheet has been presented over the AppleView. I think it shouldn't because of StateObject
Hi Alex. I'm following your example and realized that AppleViewModel init twice when any sheet from the AppleView is presented, but StateObject shouldn't init twice. Any tips how to avoid it?
Yes, that is also possible. Next chech out DurationPicker in SwiftUI: Simple & Fast Solution! 👇 ua-cam.com/video/jMhTwDxuNPk/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
Absolutely not. @EnvironmentObject is for passing data to a distant view which might not be directly connected to rootView. For general purposes you should pass data through initializer, also for complex case you might pass closure to the initializer parameter, this approach I am not sure how you can do that.
My advice is to use Environment Objects: ua-cam.com/video/2D05dGo3jB4/v-deo.htmlsi=YzAkBvjeGwMhcf56 Next watch SwiftUI Alerts Using Sheets: A More Efficient Implementation Method 👇 ua-cam.com/video/_xod2ZVrUHk/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
So I bought the code, in trying to set it up it looks like to use the push and pop it needs to be included in the setup in the contentView. What I’m trying to do is use a tabView after the welcome screen intro and a successful login happens. I do not want the tab bar showing when these screens are shown. Workflow is when app launches it shows intro screen, when it’s dismissed goes to login screen. After successful login. It goes to the Tabbar view( that is shown in your demo project). I have tried many different things but when I try to use the navigation.push(.home) nothing happens. So first question does all the SwiftUI views need to be included in the tabView ( like your contentView in your example) to work? Thanks
I have been using NStack, I thought this might be better but it looks like it has limitations. If you could include a login screen that when is dismisses it goes to a tabView that would be great.
Have added an example project with TabView and login logic :) Have you seen my latest video? 👉 NavigationStack vs. NavigationCoordinator: You Won’t Believe the Difference! ua-cam.com/video/7fb7CXty5i4/v-deo.html
Check the links in the description. Next escape the GeometryReader nightmare 👇 ua-cam.com/video/zf-Qnx4laT4/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
Thanks for the feedback. Unfortunately this will mess up the pop functionality Next check out In-App Purchases in SwiftUI: Full Tutorial! 👇 ua-cam.com/video/Nxq_ildDObE/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
Simplifying SwiftUI Navigation Sheets with Enums 👉 ua-cam.com/video/G-sNeBn2XwM/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
I'm going to buy your package for navigation. I like how is simple on the implementation, but I would like to know how can we pass data between views?
I read a comment below about EnviromentObject and heard from the tutorial video that you don't recommend to use associated values for enum, but how can pass data in a viewmodel using your package?
How can we handle navigation from a viewmodel with your package?
Hey there. There are demo Xcode projects with the product where you can learn how to move data between views.
Next check out AI in Xcode: Elevate Your App Development to the Next Level 👇
ua-cam.com/video/L7OI_o1IN3A/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
@@rebeloper Hey. Thanks for the great library.
I'm following your demo and realized that AppleViewModel initialized once again when any sheet has been presented over the AppleView.
I think it shouldn't because of StateObject
Hi Alex. I'm following your example and realized that AppleViewModel init twice when any sheet from the AppleView is presented, but StateObject shouldn't init twice. Any tips how to avoid it?
But what if i want achieve deeplink and popToRoot with a single transition? Is it possible?
Yes, that is also possible.
Next chech out DurationPicker in SwiftUI: Simple & Fast Solution! 👇
ua-cam.com/video/jMhTwDxuNPk/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
Very nice ! But which approach would you recommend if you need property Injection in your view ?
Use the @EnvironmentObject
Shocking: AI Creates Complete iOS App 👇
ua-cam.com/video/v2lq4B0VMFk/v-deo.html
Absolutely not. @EnvironmentObject is for passing data to a distant view which might not be directly connected to rootView. For general purposes you should pass data through initializer, also for complex case you might pass closure to the initializer parameter, this approach I am not sure how you can do that.
How to send parameters to other View??
My advice is to use Environment Objects: ua-cam.com/video/2D05dGo3jB4/v-deo.htmlsi=YzAkBvjeGwMhcf56
Next watch SwiftUI Alerts Using Sheets: A More Efficient Implementation Method 👇
ua-cam.com/video/_xod2ZVrUHk/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
@@rebeloper sure, I understand how to use environment object, but that it works in a really big projects ? (Like a HomeBanking)
So I bought the code, in trying to set it up it looks like to use the push and pop it needs to be included in the setup in the contentView. What I’m trying to do is use a tabView after the welcome screen intro and a successful login happens. I do not want the tab bar showing when these screens are shown.
Workflow is when app launches it shows intro screen, when it’s dismissed goes to login screen. After successful login. It goes to the Tabbar view( that is shown in your demo project). I have tried many different things but when I try to use the navigation.push(.home) nothing happens.
So first question does all the SwiftUI views need to be included in the tabView ( like your contentView in your example) to work?
Thanks
I have been using NStack, I thought this might be better but it looks like it has limitations. If you could include a login screen that when is dismisses it goes to a tabView that would be great.
Have added an example project with TabView and login logic :)
Have you seen my latest video? 👉 NavigationStack vs. NavigationCoordinator: You Won’t Believe the Difference!
ua-cam.com/video/7fb7CXty5i4/v-deo.html
99$ too expensive for me. Can you discount?
There are some in the description.
amazing.. thankyou.. can you give it to me free
Check the links in the description.
Next escape the GeometryReader nightmare 👇
ua-cam.com/video/zf-Qnx4laT4/v-deo.html&ab_channel=Rebeloper-RebelDeveloper
HI @rebeloper
I suggest to enable NavigationStack to iOS 16 or higher in struct struct DestinationLinkModifier: ViewModifier
@ViewBuilder
func groupContent(_ content: Content) -> some View {
if #available(iOS 16.0, *) {
NavigationStack {
content
.navigationDestination(isPresented: $isPresented, destination: destination)
}
} else {
content
.background(
NavigationLink(isActive: $isPresented, destination: destination, label: {
EmptyView()
})
)
}
}
Thanks for the feedback. Unfortunately this will mess up the pop functionality
Next check out In-App Purchases in SwiftUI: Full Tutorial! 👇
ua-cam.com/video/Nxq_ildDObE/v-deo.html&ab_channel=Rebeloper-RebelDeveloper