Search
Duplicate

(SwiftUI) @EnvironmentObject 여러개 적용하기

간단소개
팔만코딩경 컨트리뷰터
ContributorNotionAccount
주제 / 분류
SwiftUI
Scrap
태그
9 more properties

in SceneDelegate

let rootView = MainView() .environmentObject(mySchedule) .environmentObject(MapItemModel()) if let windowScene = scene as? UIWindowScene { let window = UIWindow(windowScene: windowScene) window.rootViewController = UIHostingController(rootView: rootView) self.window = window window.makeKeyAndVisible()
Swift
복사