viewbuilder

SwiftUI custom View's ViewBuilder doesn't re-render/update on subclassed ObservedObject update

社会主义新天地 提交于 2020-03-25 19:22:50
问题 This one I've been researching for a few days, scouring the Swift & SwiftUI docs, SO, forums, etc. and can't seem to find an answer. Here is the problem; I have a SwiftUI custom View that does some state determination on a custom API request class to a remote resource. The View handles showing loading states and failure states, along with its body contents being passed through via ViewBuilder so that if the state from the API is successful and the resource data is loaded, it will show the