Skip to content

Commit 5c0a42e

Browse files
CalebRasphilium
andauthored
Update Shared/Samples/Animate 3D graphic/Animate3DGraphicView.Model.swift
Co-authored-by: Philip Ridgeway <[email protected]>
1 parent d5998bc commit 5c0a42e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,10 @@ extension Animate3DGraphicView {
277277
/// - Parameter filename: The name of the file containing the CSV data.
278278
mutating func loadFrames(for filename: String) {
279279
// Get the content of the file from the bundle using the filename name.
280-
guard let path = Bundle.main.url(forResource: filename, withExtension: "csv"),
281-
let content = try? String(contentsOf: path, encoding: .utf8) else { return }
280+
guard let url = Bundle.main.url(forResource: filename, withExtension: "csv"),
281+
let content = try? String(contentsOf: url, encoding: .utf8) else {
282+
return
283+
}
282284

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

0 commit comments

Comments
 (0)