File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,13 @@ let landmarkData: [Landmark] = load("landmarkData.json")
1414func load< T: Decodable > ( _ filename: String , as type: T . Type = T . self) -> T {
1515 let data : Data
1616
17+ /*
1718 guard let file = Bundle.main.url(forResource: filename, withExtension: nil)
1819 else {
1920 fatalError("Couldn't find \(filename) in main bundle.")
2021 }
22+ */
23+ let file = URL ( fileURLWithPath: " LandmarkTutorial3Complete/Landmarks/Landmarks/Resources/ " + filename)
2124
2225 do {
2326 data = try Data ( contentsOf: file)
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ struct LandmarkRow: View {
1616 Text ( verbatim: landmark. name)
1717 Spacer ( )
1818
19- /* if landmark.isFavorite {
19+ if landmark. isFavorite {
2020 Image ( systemName: " star.fill " )
2121 . imageScale ( . medium)
2222 . foregroundColor ( . yellow)
23- }*/
23+ } else { } // what
2424 }
2525 }
2626}
You can’t perform that action at this time.
0 commit comments