Skip to content

Commit 256c7fb

Browse files
committed
更新下载列表
1 parent 8273c48 commit 256c7fb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tools/update/download.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
14. <details><summary><a href="https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic128/v4/0b/fe/9f/0bfe9fe6-faae-0470-a9b0-81c1908cf484/305-1366423083051400424-14_11_08_17_prores_1_CS193p_1080p_3mb_cc.m4v">Persistence and Documents Demo</a></summary>Paul Hegarty extends his coverage of Documents. He then does a demonstration of using Codable to create a JSON representation, storing it in the filesystem then letting UIDocument store it instead, and then using UIDocumentBrowserViewController to choose/create/rename/move documents.</details>
1919
15. <details><summary><a href="https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic118/v4/ca/bd/dc/cabddc02-88ed-f3b1-42df-a9efb8271e48/532-3346936006580998385-15_11_13_17_prores_CS193p_1080p_3mb_cc.m4v">Alerts, Notifications, Application Lifecycle</a></summary>Paul Hegarty covers alerts and action sheets, notifications and KVO, and the application lifecycle.</details>
2020
16. <details><summary><a href="https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic118/v4/53/9b/4d/539b4d08-12e4-e0ff-8429-21d3b3df534a/511-8983128522622077657-16_11_15_17_prores_CS193p_1080p_3mb.m4v">More Segues</a></summary>Paul Hegarty talks about modal, popover, unwind, and embed segues.</details>
21+
17. <details><summary><a href="https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic128/v4/e9/be/0c/e9be0c8d-28dc-a6fd-8e71-8515c2f78ca5/506-4176003801724267012-17_11_29_17_WIP02_CS193p_1080p_3mb_cc.m4v">Core Motion and Camera</a></summary>Paul Hegarty introduces Core Motion – detecting the position and movement of the device – and then does a demo with Gravity-Driven Playing Card. He then covers taking pictures within your app.</details>
2122

2223
# 周五课程 / Friday Sessions
2324

@@ -43,6 +44,7 @@
4344
14. [Lecture 14 Slides](https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic128/v4/fa/71/a4/fa71a463-d836-f2d2-005d-e00ca2d84b48/322-5794459892624250293-CS193P_F17_Lecture_14.pdf)
4445
15. [Lecture 15 Slides](https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic118/v4/1d/4d/19/1d4d19f2-e6de-0cb4-d7c7-f33d68f66b23/522-830176750758320683-CS193P_F17_Lecture_15.pdf)
4546
16. [Lecture 16 Slides](https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic128/v4/71/df/17/71df17c8-daa9-747c-cc0e-610303b1129d/512-802352814004650525-CS193P_F17_Lecture_16.pdf)
47+
17. [Lecture 17 Slides](https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic128/v4/2c/43/84/2c438427-46b9-efb4-d774-0edc98073f3b/520-5280642336803569160-CS193P_F17_Lecture_17_Slides.pdf)
4648

4749
# 阅读作业 / Readings
4850

@@ -59,4 +61,4 @@
5961
5. [Image Gallery](https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic118/v4/22/c3/00/22c30013-28dd-41eb-e104-a4594ec95dad/308-8518403617003934463-CS193P_F17_Assignment_5.pdf)
6062
6. [Persistent Image Gallery](https://itunesu-assets.itunes.apple.com/apple-assets-us-std-000001/CobaltPublic128/v4/5a/46/19/5a4619d5-bee0-1379-e204-731912cea353/307-9138746427331321981-CS193P_F17_Assignment_6.pdf)
6163

62-
<details><summary>已收录 44/44 Entries</summary><script type="text/javascript"> window.onload = function () { document.getElementsByClassName("project-name")[0].innerHTML = "下载列表 / Course Materials"; } </script></details>
64+
<details><summary>已收录 46/46 Entries</summary><script type="text/javascript"> window.onload = function () { document.getElementsByClassName("project-name")[0].innerHTML = "下载列表 / Course Materials"; } </script></details>

tools/update/main.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ struct Resource: CustomStringConvertible {
4444
init?(title: String, url: String, summary: String?) {
4545
self.url = url
4646

47-
type = ResourceType.all.first { title.contains($0.rawValue) }!
48-
47+
let optional = ResourceType.all.first { title.contains($0.rawValue) }
48+
if let type = optional { self.type = type } else { return nil }
49+
4950
var parts: [String]
5051
switch type {
5152
case .lecture:

0 commit comments

Comments
 (0)