How do I access data from a child view as the parent view at any time in SwiftUI?

前端 未结 3 1393
暗喜
暗喜 2021-01-13 13:00

I\'m new to SwiftUI and understand that I may need to implement EnvironmentObject in some way, but I\'m not sure how in this case.

This is the Trade cla

3条回答
  •  我在风中等你
    2021-01-13 13:48

    firstly thanks a lot to graycampbell for giving me a better understanding! However, my understanding does not seem to work out completely. I have a slightly different case which I'm not fully able to solve.

    I've already asked my question in a separate thread, but I want to add it here as well, because it somehow fits the topic: Reading values from list of toggles in SwiftUI

    Maybe somebody of you guys can help me with this. The main difference to the initial post if this topic is, that I have to collect Data from each GameGenerationRow in the GameGenerationView and then hand it over to another View.

提交回复
热议问题