EnvironmentObject
![[SwiftUI] ObservableObject 강제 새로고침 하는 법](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FDMldR%2FbtrORZMx2As%2Fo849926DspgpfsLETBDJHK%2Fimg.jpg)
[SwiftUI] ObservableObject 강제 새로고침 하는 법
@StateObject 혹은 @EnvironmentObject 의 데이터에 따라 View가 최신화 되지 않는 경우 ObservableObject 클래스 내 @Published 데이터 변화를 강제로 보내는 법 class ExViewModel: ObservableObject { @Published data: String = "example" func example() { ..... self.data = "example change" //@Published 변수가 변동됨을 강제로 View에 알림 self.objectWillChange.send() } }