Post

Replies

Boosts

Views

Activity

Comment on Issues building HikeView.swift (from SwiftUI Tutorial)
I did select copy and add to targets, but to no avail. Here is the code for my Hike.swift. I think it should be good though because once I couldn't solve my issues I copied it right over from the tutorial. I think ill try deleting all the imported files and re-importing them again. My Code: // Hike.swift // Landmarks // // Created by Tanner Uzzell on 1/11/22. // import Foundation struct Hike: Codable, Hashable, Identifiable {   var id: Int   var name: String   var distance: Double   var difficulty: Int   var observations: [Observation]   static var formatter = LengthFormatter()   var distanceText: String {     Hike.formatter       .string(fromValue: distance, unit: .kilometer)   }   struct Observation: Codable, Hashable {     var distanceFromStart: Double     var elevation: Range<Double>     var pace: Range<Double>     var heartRate: Range<Double>   } }```
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22