I am redoing the tutorial, and have found issues with the code. In fact, I've had to change a few things. Is this due to different versions of Xcode? for example... the preview is specified in the tutorial as :
#Preview {
Group {
LandmarkRow(landmark: landmarks[0])
LandmarkRow(landmark: landmarks[1])
}
}
When I create a new view, the preview is automatically provided as:
struct LandmarkRow_Previews: PreviewProvider {
static var previews: some View {
LandmarkRow(landmark: landmarks[0])
}
}
Am I missing something, or is it another version of the code, and then certain things don't work anymore?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: