Post

Replies

Boosts

Views

Activity

Reply to SwiftUI previews stopped working everywhere after using EnvironmentObject
Working on the tutorial on XCode 12.5.1 Getting error until the Step 7. This is how is solve the issue on LandmarkList struct LandmarkList_Previews: PreviewProvider {   static var modelData = ModelData()   static var previews: some View {     ForEach(["iPhone 12 Pro Max"], id: \.self) { deviceName in       LandmarkList().environmentObject(modelData)         .previewDevice(PreviewDevice(rawValue: deviceName))         .previewDisplayName(deviceName)     }   } }
Jul ’21