Dear Fellow Developers,
I am very new to the coding world and thanks to Apple it is very satisfying and easy to study and understand Swift.
However while I am following to instructions letter by letter to not make any mistake I hit a problem.
After the part where I have to create a new SwiftUI View as LandmarksRow I put the following codes as it shows on the website then preview crashes then stops and I can't do anything about it. It keeps crashing. I don't know if there is a problem with the code or my computer. I checked every other swift file and I am sure it is %100 percent what it writes in the instructions. I have latest versions of software and M1 Macbook Pro with 16GB ram if that helps.
import SwiftUI
struct LandmarkRow: View {
var landmark: Landmark
var body: some View {
Text(landmark.name)
}
}
struct LandmarkRow_Previews: PreviewProvider {
static var previews: some View {
LandmarkRow(landmark: landmarks[0])
}
}