Browse Source

Sample code update for chapter 3

Alexandr 4 năm trước cách đây
mục cha
commit
891ea64b9b

Landmarks/BuildingListsAndNavigation.xcodeproj/.xcodesamplecode.plist → Landmarks/HandlingUserInput.xcodeproj/.xcodesamplecode.plist


+ 33 - 33
Landmarks/BuildingListsAndNavigation.xcodeproj/project.pbxproj

@@ -7,8 +7,6 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		8410A1F7252F5F980086E518 /* LandmarkRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8410A1F6252F5F980086E518 /* LandmarkRow.swift */; };
-		8410A1FA252F61C70086E518 /* LandmarkList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8410A1F9252F61C70086E518 /* LandmarkList.swift */; };
 		B7394866229F194000C47603 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7394865229F194000C47603 /* AppDelegate.swift */; };
 		B7394868229F194000C47603 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7394867229F194000C47603 /* SceneDelegate.swift */; };
 		B739486A229F194000C47603 /* LandmarkDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7394869229F194000C47603 /* LandmarkDetail.swift */; };
@@ -20,7 +18,6 @@
 		B7394881229F28B900C47603 /* Landmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = B739487F229F28B900C47603 /* Landmark.swift */; };
 		B7394882229F28B900C47603 /* Data.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7394880229F28B900C47603 /* Data.swift */; };
 		B7394891229F292F00C47603 /* rainbowlake.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B7394884229F292D00C47603 /* rainbowlake.jpg */; };
-		B7394892229F292F00C47603 /* yukon_charleyrivers.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B7394885229F292D00C47603 /* yukon_charleyrivers.jpg */; };
 		B7394893229F292F00C47603 /* icybay.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B7394886229F292E00C47603 /* icybay.jpg */; };
 		B7394894229F292F00C47603 /* lakemcdonald.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B7394887229F292E00C47603 /* lakemcdonald.jpg */; };
 		B7394895229F292F00C47603 /* turtlerock.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B7394888229F292E00C47603 /* turtlerock.jpg */; };
@@ -32,12 +29,14 @@
 		B739489B229F292F00C47603 /* landmarkData.json in Resources */ = {isa = PBXBuildFile; fileRef = B739488E229F292E00C47603 /* landmarkData.json */; };
 		B739489C229F292F00C47603 /* chincoteague.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B739488F229F292F00C47603 /* chincoteague.jpg */; };
 		B739489D229F292F00C47603 /* chilkoottrail.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B7394890229F292F00C47603 /* chilkoottrail.jpg */; };
+		B739489F229F2D9700C47603 /* LandmarkRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B739489E229F2D9700C47603 /* LandmarkRow.swift */; };
+		B73948A1229F2E1F00C47603 /* LandmarkList.swift in Sources */ = {isa = PBXBuildFile; fileRef = B73948A0229F2E1F00C47603 /* LandmarkList.swift */; };
+		B73948A3229F3E2200C47603 /* charleyrivers.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B73948A2229F3E2200C47603 /* charleyrivers.jpg */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		32C0591524A7452A1B7C1DE3 /* LICENSE.txt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
-		8410A1F6252F5F980086E518 /* LandmarkRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LandmarkRow.swift; sourceTree = "<group>"; };
-		8410A1F9252F61C70086E518 /* LandmarkList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LandmarkList.swift; sourceTree = "<group>"; };
+		6AF17FBC250C47AD4B5BC2FB /* SampleCode.xcconfig */ = {isa = PBXFileReference; name = SampleCode.xcconfig; path = ../Configuration/SampleCode.xcconfig; sourceTree = "<group>"; };
+		8016A7122042026B58FF1299 /* LICENSE.txt */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE.txt; sourceTree = "<group>"; };
 		B7394862229F194000C47603 /* Landmarks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Landmarks.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		B7394865229F194000C47603 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		B7394867229F194000C47603 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -51,7 +50,6 @@
 		B739487F229F28B900C47603 /* Landmark.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Landmark.swift; sourceTree = "<group>"; };
 		B7394880229F28B900C47603 /* Data.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = "<group>"; };
 		B7394884229F292D00C47603 /* rainbowlake.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = rainbowlake.jpg; sourceTree = "<group>"; };
-		B7394885229F292D00C47603 /* yukon_charleyrivers.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = yukon_charleyrivers.jpg; sourceTree = "<group>"; };
 		B7394886229F292E00C47603 /* icybay.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = icybay.jpg; sourceTree = "<group>"; };
 		B7394887229F292E00C47603 /* lakemcdonald.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = lakemcdonald.jpg; sourceTree = "<group>"; };
 		B7394888229F292E00C47603 /* turtlerock.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = turtlerock.jpg; sourceTree = "<group>"; };
@@ -63,8 +61,10 @@
 		B739488E229F292E00C47603 /* landmarkData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = landmarkData.json; sourceTree = "<group>"; };
 		B739488F229F292F00C47603 /* chincoteague.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = chincoteague.jpg; sourceTree = "<group>"; };
 		B7394890229F292F00C47603 /* chilkoottrail.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = chilkoottrail.jpg; sourceTree = "<group>"; };
+		B739489E229F2D9700C47603 /* LandmarkRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LandmarkRow.swift; path = "Supporting Views/LandmarkRow.swift"; sourceTree = "<group>"; };
+		B73948A0229F2E1F00C47603 /* LandmarkList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LandmarkList.swift; sourceTree = "<group>"; };
+		B73948A2229F3E2200C47603 /* charleyrivers.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = charleyrivers.jpg; sourceTree = "<group>"; };
 		C4E4AAA0C4E4035000000001 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
-		FB75835CADF255844DAD0DAD /* SampleCode.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = SampleCode.xcconfig; path = ../Configuration/SampleCode.xcconfig; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -78,31 +78,22 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		0BA6BB22EC06EFBEA60A948C /* Configuration */ = {
+		00ABA66E85532B385D477CBF /* Configuration */ = {
 			isa = PBXGroup;
 			children = (
-				FB75835CADF255844DAD0DAD /* SampleCode.xcconfig */,
+				6AF17FBC250C47AD4B5BC2FB /* SampleCode.xcconfig */,
 			);
 			name = Configuration;
 			sourceTree = "<group>";
 		};
-		210CBA1CD0F2559FBC78D82D /* LICENSE */ = {
-			isa = PBXGroup;
-			children = (
-				32C0591524A7452A1B7C1DE3 /* LICENSE.txt */,
-			);
-			name = LICENSE;
-			path = ../LICENSE;
-			sourceTree = "<group>";
-		};
 		B7394859229F194000C47603 = {
 			isa = PBXGroup;
 			children = (
 				C4E4AAA0C4E4035000000001 /* README.md */,
 				B7394864229F194000C47603 /* Landmarks */,
 				B7394863229F194000C47603 /* Products */,
-				0BA6BB22EC06EFBEA60A948C /* Configuration */,
-				210CBA1CD0F2559FBC78D82D /* LICENSE */,
+				00ABA66E85532B385D477CBF /* Configuration */,
+				E573155042573F7430EB4C1C /* LICENSE */,
 			);
 			sourceTree = "<group>";
 		};
@@ -120,9 +111,9 @@
 				B739487E229F282200C47603 /* Models */,
 				B7394865229F194000C47603 /* AppDelegate.swift */,
 				B7394867229F194000C47603 /* SceneDelegate.swift */,
+				B73948A0229F2E1F00C47603 /* LandmarkList.swift */,
+				B739489E229F2D9700C47603 /* LandmarkRow.swift */,
 				B7394869229F194000C47603 /* LandmarkDetail.swift */,
-				8410A1F6252F5F980086E518 /* LandmarkRow.swift */,
-				8410A1F9252F61C70086E518 /* LandmarkList.swift */,
 				B739487D229F1C0100C47603 /* Supporting Views */,
 				B7394883229F291A00C47603 /* Resources */,
 				B739486B229F194200C47603 /* Assets.xcassets */,
@@ -174,11 +165,20 @@
 				B7394888229F292E00C47603 /* turtlerock.jpg */,
 				B739488C229F292E00C47603 /* twinlake.jpg */,
 				B7394889229F292E00C47603 /* umbagog.jpg */,
-				B7394885229F292D00C47603 /* yukon_charleyrivers.jpg */,
+				B73948A2229F3E2200C47603 /* charleyrivers.jpg */,
 			);
 			path = Resources;
 			sourceTree = "<group>";
 		};
+		E573155042573F7430EB4C1C /* LICENSE */ = {
+			isa = PBXGroup;
+			children = (
+				8016A7122042026B58FF1299 /* LICENSE.txt */,
+			);
+			name = LICENSE;
+			path = ../LICENSE;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -214,7 +214,7 @@
 					};
 				};
 			};
-			buildConfigurationList = B739485D229F194000C47603 /* Build configuration list for PBXProject "BuildingListsAndNavigation" */;
+			buildConfigurationList = B739485D229F194000C47603 /* Build configuration list for PBXProject "HandlingUserInput" */;
 			compatibilityVersion = "Xcode 9.3";
 			developmentRegion = en;
 			hasScannedForEncodings = 0;
@@ -240,6 +240,7 @@
 				B739489A229F292F00C47603 /* silversalmoncreek.jpg in Resources */,
 				B7394894229F292F00C47603 /* lakemcdonald.jpg in Resources */,
 				B7394872229F194200C47603 /* LaunchScreen.storyboard in Resources */,
+				B73948A3229F3E2200C47603 /* charleyrivers.jpg in Resources */,
 				B7394891229F292F00C47603 /* rainbowlake.jpg in Resources */,
 				B739486F229F194200C47603 /* Preview Assets.xcassets in Resources */,
 				B7394895229F292F00C47603 /* turtlerock.jpg in Resources */,
@@ -252,7 +253,6 @@
 				B7394893229F292F00C47603 /* icybay.jpg in Resources */,
 				B7394897229F292F00C47603 /* hiddenlake.jpg in Resources */,
 				B7394898229F292F00C47603 /* stmarylake.jpg in Resources */,
-				B7394892229F292F00C47603 /* yukon_charleyrivers.jpg in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -267,10 +267,10 @@
 				B7394866229F194000C47603 /* AppDelegate.swift in Sources */,
 				B739487A229F1B3F00C47603 /* CircleImage.swift in Sources */,
 				B739487C229F1B6800C47603 /* MapView.swift in Sources */,
-				8410A1FA252F61C70086E518 /* LandmarkList.swift in Sources */,
+				B73948A1229F2E1F00C47603 /* LandmarkList.swift in Sources */,
 				B7394868229F194000C47603 /* SceneDelegate.swift in Sources */,
 				B739486A229F194000C47603 /* LandmarkDetail.swift in Sources */,
-				8410A1F7252F5F980086E518 /* LandmarkRow.swift in Sources */,
+				B739489F229F2D9700C47603 /* LandmarkRow.swift in Sources */,
 				B7394881229F28B900C47603 /* Landmark.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -291,7 +291,7 @@
 /* Begin XCBuildConfiguration section */
 		B7394874229F194200C47603 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = FB75835CADF255844DAD0DAD /* SampleCode.xcconfig */;
+			baseConfigurationReference = 6AF17FBC250C47AD4B5BC2FB /* SampleCode.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
@@ -353,7 +353,7 @@
 		};
 		B7394875229F194200C47603 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = FB75835CADF255844DAD0DAD /* SampleCode.xcconfig */;
+			baseConfigurationReference = 6AF17FBC250C47AD4B5BC2FB /* SampleCode.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
@@ -409,7 +409,7 @@
 		};
 		B7394877229F194200C47603 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = FB75835CADF255844DAD0DAD /* SampleCode.xcconfig */;
+			baseConfigurationReference = 6AF17FBC250C47AD4B5BC2FB /* SampleCode.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_STYLE = Automatic;
@@ -431,7 +431,7 @@
 		};
 		B7394878229F194200C47603 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = FB75835CADF255844DAD0DAD /* SampleCode.xcconfig */;
+			baseConfigurationReference = 6AF17FBC250C47AD4B5BC2FB /* SampleCode.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_STYLE = Automatic;
@@ -454,7 +454,7 @@
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		B739485D229F194000C47603 /* Build configuration list for PBXProject "BuildingListsAndNavigation" */ = {
+		B739485D229F194000C47603 /* Build configuration list for PBXProject "HandlingUserInput" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				B7394874229F194200C47603 /* Debug */,

Landmarks/BuildingListsAndNavigation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist → Landmarks/HandlingUserInput.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist


Landmarks/BuildingListsAndNavigation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings → Landmarks/HandlingUserInput.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings


Landmarks/BuildingListsAndNavigation.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist → Landmarks/HandlingUserInput.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist


+ 0 - 8
Landmarks/Landmarks/Assets.xcassets/LICENSE/LICENSE.txt

@@ -1,8 +0,0 @@
-Copyright © 2020 Apple Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-

+ 0 - 3
Landmarks/Landmarks/Assets.xcassets/README.md

@@ -1,3 +0,0 @@
-# Building Lists and Navigation
-
-Use this project to code along with the [Building Lists and Navigation](https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation) tutorial.

+ 2 - 1
Landmarks/Landmarks/LandmarkDetail.swift

@@ -9,7 +9,7 @@ import SwiftUI
 
 struct LandmarkDetail: View {
     var landmark: Landmark
-    
+
     var body: some View {
         VStack {
             MapView(coordinate: landmark.locationCoordinate)
@@ -23,6 +23,7 @@ struct LandmarkDetail: View {
             VStack(alignment: .leading) {
                 Text(landmark.name)
                     .font(.title)
+
                 HStack(alignment: .top) {
                     Text(landmark.park)
                         .font(.subheadline)

+ 11 - 12
Landmarks/Landmarks/LandmarkList.swift

@@ -1,19 +1,18 @@
-//
-//  LandmarkList.swift
-//  Landmarks
-//
-//  Created by Admin on 08.10.2020.
-//  Copyright © 2020 Apple. All rights reserved.
-//
+/*
+See LICENSE folder for this sample’s licensing information.
+
+Abstract:
+A view showing a list of landmarks.
+*/
 
 import SwiftUI
 
 struct LandmarkList: View {
     var body: some View {
-        NavigationView{
-            List(landmarkData){ landmark1 in
-                NavigationLink(destination: LandmarkDetail(landmark: landmark1)){
-                    LandmarkRow(landmark: landmark1)
+        NavigationView {
+            List(landmarkData) { landmark in
+                NavigationLink(destination: LandmarkDetail(landmark: landmark)) {
+                    LandmarkRow(landmark: landmark)
                 }
             }
             .navigationBarTitle(Text("Landmarks"))
@@ -23,7 +22,7 @@ struct LandmarkList: View {
 
 struct LandmarkList_Previews: PreviewProvider {
     static var previews: some View {
-        ForEach(["iPhone SE", "iPhone XS Max"], id: \.self){ deviceName in
+        ForEach(["iPhone SE", "iPhone XS Max"], id: \.self) { deviceName in
             LandmarkList()
                 .previewDevice(PreviewDevice(rawValue: deviceName))
                 .previewDisplayName(deviceName)

+ 2 - 0
Landmarks/Landmarks/Models/Landmark.swift

@@ -16,6 +16,7 @@ struct Landmark: Hashable, Codable, Identifiable {
     var state: String
     var park: String
     var category: Category
+    var isFavorite: Bool
 
     var locationCoordinate: CLLocationCoordinate2D {
         CLLocationCoordinate2D(
@@ -27,6 +28,7 @@ struct Landmark: Hashable, Codable, Identifiable {
         case featured = "Featured"
         case lakes = "Lakes"
         case rivers = "Rivers"
+        case mountains = "Mountains"
     }
 }
 

Landmarks/Landmarks/Resources/yukon_charleyrivers.jpg → Landmarks/Landmarks/Resources/charleyrivers.jpg


+ 29 - 5
Landmarks/Landmarks/Resources/landmarkData.json

@@ -1,10 +1,12 @@
 [
     {
         "name": "Turtle Rock",
-        "category": "Featured",
+        "category": "Rivers",
         "city": "Twentynine Palms",
         "state": "California",
         "id": 1001,
+        "isFeatured": true,
+        "isFavorite": true,
         "park": "Joshua Tree National Park",
         "coordinates": {
             "longitude": -116.166868,
@@ -18,6 +20,8 @@
         "city": "Port Alsworth",
         "state": "Alaska",
         "id": 1002,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "Lake Clark National Park and Preserve",
         "coordinates": {
             "longitude": -152.665167,
@@ -27,10 +31,12 @@
     },
     {
         "name": "Chilkoot Trail",
-        "category": "Rivers",
+        "category": "Mountains",
         "city": "Skagway",
         "state": "Alaska",
         "id": 1003,
+        "isFeatured": false,
+        "isFavorite": true,
         "park": "Klondike Gold Rush National Historical Park",
         "coordinates": {
             "longitude": -135.334571,
@@ -44,6 +50,8 @@
         "city": "Browning",
         "state": "Montana",
         "id": 1004,
+        "isFeatured": true,
+        "isFavorite": true,
         "park": "Glacier National Park",
         "coordinates": {
             "longitude": -113.536248,
@@ -57,6 +65,8 @@
         "city": "Twin Lakes",
         "state": "Alaska",
         "id": 1005,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "Lake Clark National Park and Preserve",
         "coordinates": {
             "longitude": -153.849883,
@@ -66,10 +76,12 @@
     },
     {
         "name": "Lake McDonald",
-        "category": "Lakes",
+        "category": "Mountains",
         "city": "West Glacier",
         "state": "Montana",
         "id": 1006,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "Glacier National Park",
         "coordinates": {
             "longitude": -113.934831,
@@ -83,19 +95,23 @@
         "city": "Eaking",
         "state": "Alaska",
         "id": 1007,
+        "isFeatured": true,
+        "isFavorite": false,
         "park": "Charley Rivers National Preserve",
         "coordinates": {
             "longitude": -143.122586,
             "latitude": 65.350021
         },
-        "imageName": "yukon_charleyrivers"
+        "imageName": "charleyrivers",
     },
     {
         "name": "Icy Bay",
-        "category": "Lakes",
+        "category": "Mountains",
         "city": "Icy Bay",
         "state": "Alaska",
         "id": 1008,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "Wrangell-St. Elias National Park and Preserve",
         "coordinates": {
             "longitude": -141.518167,
@@ -109,6 +125,8 @@
         "city": "Willow",
         "state": "Alaska",
         "id": 1009,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "State Recreation Area",
         "coordinates": {
             "longitude": -150.086103,
@@ -122,6 +140,8 @@
         "city": "Newhalem",
         "state": "Washington",
         "id": 1010,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "North Cascades National Park",
         "coordinates": {
             "longitude": -121.17799,
@@ -135,6 +155,8 @@
         "city": "Chincoteague",
         "state": "Virginia",
         "id": 1011,
+        "isFeatured": false,
+        "isFavorite": false,
         "park": "Chincoteague National Wildlife Refuge",
         "coordinates": {
             "longitude": -75.383212,
@@ -148,6 +170,8 @@
         "city": "Errol",
         "state": "New Hampshire",
         "id": 1012,
+        "isFeatured": true,
+        "isFavorite": false,
         "park": "Umbagog National Wildlife Refuge",
         "coordinates": {
             "longitude": -71.056816,

+ 2 - 3
Landmarks/Landmarks/Supporting Views/CircleImage.swift

@@ -9,12 +9,11 @@ import SwiftUI
 
 struct CircleImage: View {
     var image: Image
-    
+
     var body: some View {
         image
             .clipShape(Circle())
-            .overlay(
-                Circle().stroke(Color.white, lineWidth: 4))
+            .overlay(Circle().stroke(Color.white, lineWidth: 4))
             .shadow(radius: 10)
     }
 }

+ 7 - 8
Landmarks/Landmarks/LandmarkRow.swift

@@ -1,16 +1,15 @@
-//
-//  LandmarkRow.swift
-//  Landmarks
-//
-//  Created by Admin on 08.10.2020.
-//  Copyright © 2020 Apple. All rights reserved.
-//
+/*
+See LICENSE folder for this sample’s licensing information.
+
+Abstract:
+A single row to be displayed in a list of landmarks.
+*/
 
 import SwiftUI
 
 struct LandmarkRow: View {
     var landmark: Landmark
-    
+
     var body: some View {
         HStack {
             landmark.image

+ 2 - 4
Landmarks/Landmarks/Supporting Views/MapView.swift

@@ -10,15 +10,13 @@ import MapKit
 
 struct MapView: UIViewRepresentable {
     var coordinate: CLLocationCoordinate2D
-    
+
     func makeUIView(context: Context) -> MKMapView {
         MKMapView(frame: .zero)
     }
 
     func updateUIView(_ uiView: MKMapView, context: Context) {
-        let coordinate = CLLocationCoordinate2D(
-            latitude: 34.011_286, longitude: -116.166_868)
-        let span = MKCoordinateSpan(latitudeDelta: 2.0, longitudeDelta: 2.0)
+        let span = MKCoordinateSpan(latitudeDelta: 0.02, longitudeDelta: 0.02)
         let region = MKCoordinateRegion(center: coordinate, span: span)
         uiView.setRegion(region, animated: true)
     }

+ 2 - 2
README.md

@@ -1,3 +1,3 @@
-# Building Lists and Navigation
+# Handling User Input
 
-Use this project to code along with the [Building Lists and Navigation](https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation) tutorial.
+Use this project to code along with the [Handling User Input](https://developer.apple.com/tutorials/swiftui/handling-user-input) tutorial.