Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    please provide a stackoverflow.com/help/minimal-reproducible-example so we can easily help you Commented May 27, 2020 at 2:55
  • I removed the code. It's not really necessary. Commented May 27, 2020 at 3:02
  • 2
    unfortunately you misunderstood me. a reproducible and runnable example is a big help for all who want to help you. if you want to make it easy for helpers, provide this example. this is not a "we write code for u for free" platform, but a "we help you with your provided code"- platform Commented May 27, 2020 at 3:22
  • My question isn't code specific. It's a general question of how data is created/passed in SwiftUI. I could easily do this in UIKit or any other language. I just don't know how SwiftUI handles variable initialization from passed values. Commented May 27, 2020 at 3:33
  • I threw in the code that I wrote. I think the mistake is I need to create an init method but I'm confused on how to do this. Commented May 27, 2020 at 3:47