Skip to content

Commit f66f42d

Browse files
authored
Merge pull request #538 from Esri/Caleb/Update-RemoveDeprecatedAPIs
[Update] Remove deprecated API usage
2 parents 2c397a1 + 5c0a42e commit f66f42d

File tree

24 files changed

+38
-32
lines changed

24 files changed

+38
-32
lines changed

Shared/Samples/Add ENC exchange set/AddENCExchangeSetView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct AddENCExchangeSetView: View {
3333
ProgressView("Loading…")
3434
.padding()
3535
.background(.ultraThickMaterial)
36-
.cornerRadius(10)
36+
.clipShape(.rect(cornerRadius: 10))
3737
.shadow(radius: 50)
3838
}
3939
}

Shared/Samples/Add raster from service/AddRasterFromServiceView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct AddRasterFromServiceView: View {
5757
ProgressView("Drawing…")
5858
.padding()
5959
.background(.ultraThinMaterial)
60-
.cornerRadius(10)
60+
.clipShape(.rect(cornerRadius: 10))
6161
.shadow(radius: 50)
6262
}
6363
}

Shared/Samples/Analyze network with subnetwork trace/AnalyzeNetworkWithSubnetworkTraceView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ struct AnalyzeNetworkWithSubnetworkTraceView: View {
132132
}
133133
.padding()
134134
.background(.ultraThickMaterial)
135-
.cornerRadius(10)
135+
.clipShape(.rect(cornerRadius: 10))
136136
.shadow(radius: 50)
137137
}
138138
}

Shared/Samples/Animate 3D graphic/Animate3DGraphicView.Model.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ extension Animate3DGraphicView {
276276
/// Loads the frames of a mission from a CSV file.
277277
/// - Parameter filename: The name of the file containing the CSV data.
278278
mutating func loadFrames(for filename: String) {
279-
// Get the path of the file from the bundle using the filename name.
280-
guard let path = Bundle.main.path(forResource: filename, ofType: "csv") else { return }
281-
282-
// Get the content of the file using the path.
283-
guard let content = try? String(contentsOfFile: path) else { return }
279+
// Get the content of the file from the bundle using the filename name.
280+
guard let url = Bundle.main.url(forResource: filename, withExtension: "csv"),
281+
let content = try? String(contentsOf: url, encoding: .utf8) else {
282+
return
283+
}
284284

285285
// Split the content by line into an array.
286286
let lines = content.split(whereSeparator: \.isNewline)

Shared/Samples/Animate 3D graphic/Animate3DGraphicView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct Animate3DGraphicView: View {
4444
.frame(width: 170, height: 100)
4545
.padding([.leading, .trailing])
4646
.background(.ultraThinMaterial)
47-
.cornerRadius(10)
47+
.clipShape(.rect(cornerRadius: 10))
4848
.shadow(radius: 3)
4949
}
5050
.padding()
@@ -65,7 +65,7 @@ struct Animate3DGraphicView: View {
6565
}
6666
}
6767
.frame(width: isShowingFullMap ? nil : 100, height: isShowingFullMap ? nil : 100)
68-
.cornerRadius(10)
68+
.clipShape(.rect(cornerRadius: 10))
6969
.shadow(radius: 3)
7070
Spacer()
7171
}

Shared/Samples/Apply mosaic rule to rasters/ApplyMosaicRuleToRastersView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct ApplyMosaicRuleToRastersView: View {
4444
ProgressView("Loading...")
4545
.padding()
4646
.background(.ultraThickMaterial)
47-
.cornerRadius(10)
47+
.clipShape(.rect(cornerRadius: 10))
4848
.shadow(radius: 50)
4949
}
5050
}

Shared/Samples/Create load report/CreateLoadReportView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct CreateLoadReportView: View {
4545
}
4646
.padding()
4747
.background(.ultraThickMaterial)
48-
.cornerRadius(10)
48+
.clipShape(.rect(cornerRadius: 10))
4949
.shadow(radius: 50)
5050
}
5151
}

Shared/Samples/Display dimensions/DisplayDimensionsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct DisplayDimensionsView: View {
5959
}
6060
.padding(8)
6161
.background(.ultraThinMaterial)
62-
.cornerRadius(10)
62+
.clipShape(.rect(cornerRadius: 10))
6363
.disabled(dimensionLayer == nil)
6464
}
6565
.padding()

Shared/Samples/Edit and sync features with feature service/EditAndSyncFeaturesWithFeatureServiceView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct EditAndSyncFeaturesWithFeatureServiceView: View {
161161
}
162162
.padding()
163163
.background(.ultraThickMaterial)
164-
.cornerRadius(10)
164+
.clipShape(.rect(cornerRadius: 10))
165165
.shadow(radius: 50)
166166
}
167167
}

Shared/Samples/Find closest facility from point/FindClosestFacilityFromPointView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct FindClosestFacilityFromPointView: View {
3636
ProgressView("Routing...")
3737
.padding()
3838
.background(.ultraThickMaterial)
39-
.cornerRadius(10)
39+
.clipShape(.rect(cornerRadius: 10))
4040
.shadow(radius: 50)
4141
}
4242
}

0 commit comments

Comments
 (0)