Posts

Post not yet marked as solved
10 Replies
3.4k Views
With the Apple Swifth UI Tutorials - Section 3 Customizing the Row Preview i am getting an error that occurs in every other subsequent part of the exercise.The error prevents me from seeing the Preview of the code in the viewer.The error isCompling failed: no type named 'LandmarkRow_Previews' in module Landmarks// LandmarkRow.swift// Landmarks//// Created by Richard Baker on 9/3/19.// Copyright © 2019 Apple. All rights reserved.//import SwiftUIstruct LandmarkRow: View { var landmark: Landmark var body: some View { HStack { landmark.image .resizeable() .frame(width: 50, height:50) Text(landmark.name) } }}struct LandmarkRow_Previews: PreviewProvider { static var previews: some View { Group { LandmarkRow(landmark: landmarkData[0]) LandmarkRow(landmark: landmarkData[1]) } .previewLayout (.fixed(width:300, height:70)) }}This error shows up in the next section of the Tuturial as well called Create the List of Landmarks.The code matches what I see displayed on the web site, so I don't really know what is going on.I am on Catalina 10.15 Beta 7 and on Xcode 11 Beta 7
Posted
by Star_Lord.
Last updated
.