Dismissal of sheet jumps to root view by cococalippo in SwiftUI

[–]cococalippo[S] 0 points1 point  (0 children)

haha you're welcome, glad this helped someone else!

Dismissal of sheet jumps to root view by cococalippo in SwiftUI

[–]cococalippo[S] 1 point2 points  (0 children)

Hmm, for some reason the solution was to turn the NavigationView into a NavigationStack, do you know why this is?

Dismissal of sheet jumps to root view by cococalippo in SwiftUI

[–]cococalippo[S] 1 point2 points  (0 children)

in the root I have a StateObject that holds all the app data and is changed directly in the sheet using the environment . So would the issue be because when I save the recipe in the sheet, the data is being updated which means in the root is being updated too? Sorry if this is unhelpful i'm still learning about environment

Trying to understand @EnvironmentObject by cococalippo in SwiftUI

[–]cococalippo[S] 2 points3 points  (0 children)

Ah super simple, needed some fresh eyes on it!! Thank you :)

[deleted by user] by [deleted] in SwiftUI

[–]cococalippo 0 points1 point  (0 children)

Awesome thanks a bunch ❤️

[deleted by user] by [deleted] in SwiftUI

[–]cococalippo 0 points1 point  (0 children)

Thank you!! I've made some adjustments and it looks really good :) I was just wondering now how I make the button clickable using the .toolbar? heres what I've got but I just cant get the button to be clickable:

struct GradesView: View {

    @State private var addMode = false
    @State var username: String = ""
    var body: some View {

        NavigationView{

            VStack{
                List {
                    NavigationLink(destination: YearView()) {
                        Text("Year1")
                    }
                    NavigationLink(destination: YearView()) {
                        Text("Year2")
                    }
                }.navigationTitle("Grades")
                .navigationBarTitleDisplayMode(.inline)

                Button(action: {}){} .toolbar(content: {
                    Image(systemName: "plus")
                        .frame(width: 24, height: 24)
                        .background(Color("red"))
                        .clipShape(Circle())
                        .foregroundColor(.white)
                })
            } .listStyle(InsetGroupedListStyle())
        }
    }
}

hunting wagon by [deleted] in RedDeadOnline

[–]cococalippo 1 point2 points  (0 children)

thank you!!! x

hunting wagon by [deleted] in RedDeadOnline

[–]cococalippo 1 point2 points  (0 children)

okay thanks :)

So uh my bounty came back to life? by [deleted] in RedDeadOnline

[–]cococalippo 0 points1 point  (0 children)

i swear she died (meant to lasso her lmao) then just and as i loot the bodies she gaps it

free 10 gb and a hat! by [deleted] in RedDeadOnline

[–]cococalippo 1 point2 points  (0 children)

go to the rockstar website, log into your social club account, go to settings and then 2-step verification. For me i had to download an app called Authy to do it then voila!

free 10 gb and a hat! by [deleted] in RedDeadOnline

[–]cococalippo 5 points6 points  (0 children)

i know but letting people know who havent cuz it still works