Skip to content

Instantly share code, notes, and snippets.

@nalexn
Created December 21, 2019 12:55
Show Gist options
  • Save nalexn/57a203ff7f65c7671b13026e2d054c9b to your computer and use it in GitHub Desktop.
Save nalexn/57a203ff7f65c7671b13026e2d054c9b to your computer and use it in GitHub Desktop.
class AppState: ObservableObject {
@Published var value: Int = 0
}
struct CustomView: View {
@EnvironmentObject var appState: AppState
var body: some View {
Text("Value: \(appState.value)")
}
}
@saroar
Copy link

saroar commented Nov 4, 2020

after I have done this I can't click on my list
cant find out why the whole day was debugging and end of the day find out this is why AppSate
https://github.com/AddaMeSPB/AddaMeIOSSwiftUI/blob/master/AddaMeIOS/Views/Chat/ConversationList.swift#L13
so do you know how I can fix this issue
https://filebin.net/t8j3dsh4xsytl854/Image_from_iOS.MP4?t=p5s377lh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment