@@ -21,7 +21,7 @@ fall of 2017 and 18 academic year.
21215
222200:00:16,516 --> 00:00:19,885
2323Today mostly, we're gonna talk about some Swift stuff.
24- 今天,大部分时间我们将要讨论一些 Swift 的事项
24+ 今天,大部分时间我们将要讨论 Swift
2525
26266
272700:00:19,953 --> 00:00:23,321
@@ -31,12 +31,12 @@ Now, you've hopefully done your homework for the reading,
31317
323200:00:23,390 --> 00:00:25,891
3333so some of the stuff will be kinda summary, but
34- 它们当中的一部分内容将会是总结
34+ 所以这节课的一部分将会是总结那些内容
3535
36368
373700:00:25,959 --> 00:00:28,560
3838some of this is really not covered in the reading.
39- 而一部分语法并没有在阅读材料中涵盖
39+ 而这节课其他的并没有在阅读材料中涵盖
4040
41419
424200:00:28,629 --> 00:00:32,197
@@ -51,12 +51,12 @@ that reading is really great but it is great concise.
515111
525200:00:36,270 --> 00:00:37,201
5353I know you probably feel like well,
54- 我知道你可能会觉得
54+ 我知道你可能会觉得
5555
565612
575700:00:37,270 --> 00:00:39,171
5858that was a lot of reading for something that's concise, but
59- 这里有太多的一些很简明的阅读内容
59+ 要说它简明的话,内容是不是太多了
6060
616113
626200:00:39,240 --> 00:00:41,473
@@ -71,7 +71,7 @@ cover some of the other stuff. But before I do all that,
717115
727200:00:43,977 --> 00:00:46,912
7373I'm gonna do a little, what I call a teaser demo of
74- 我要做些小事情,我管它叫做 auto-layout 的预告示例
74+ 我要做些小事情,我管它叫做 auto-layout 的预告示例
7575
767616
777700:00:46,981 --> 00:00:50,115
@@ -305,7 +305,7 @@ line that appears as you move things around as part of this.
305305
30630662
30730700:03:09,556 --> 00:03:12,256
308- So I'm gonna change my background from
308+ So I'm gonna change my background from
309309我要将我的背景
310310
31131163
@@ -451,7 +451,7 @@ what it does is it will take other views, like let's
45145191
45245200:04:32,839 --> 00:04:36,508
453453say these four buttons and it will stack them together.
454- 四个按钮,然后把它们堆叠在一起
454+ 四个按钮,然后把它们堆叠在一起
455455
45645692
45745700:04:36,577 --> 00:04:39,244
@@ -636,7 +636,7 @@ UI designers across all these apps. Also I wanna make sure
636636128
63763700:06:21,814 --> 00:06:26,317
638638that these four buttons get equal amount of space. Okay,
639- 这四个按钮有着相同的间距。
639+ 这四个按钮有着相同的间距
640640
641641129
64264200:06:26,386 --> 00:06:29,421
@@ -901,7 +901,7 @@ views and the UI like pinning them to each other and
901901181
90290200:08:52,832 --> 00:08:56,200
903903stuff is with control drag. Exact same way that we made
904- 是通过按住 Control 键拖拽。和我们将 UI
904+ 是通过按住 Control 键拖拽。和我们将 UI
905905
906906182
90790700:08:56,269 --> 00:08:58,202
@@ -926,7 +926,7 @@ box here to the top. Okay, so I'm just dragging up towards
926926186
92792700:09:09,115 --> 00:09:11,750
928928the top, and when I let go it's going to say, okay,
929- 当我松开鼠标的时候,它会问,
929+ 当我松开鼠标的时候,它会问
930930
931931187
93293200:09:11,818 --> 00:09:14,619
@@ -1236,7 +1236,7 @@ we want this thing to be above flips. So,
12361236248
1237123700:12:23,943 --> 00:12:26,310
12381238let's work on flips first, let's just get it, so
1239- 让我们先对 Flips 展开工作
1239+ 让我们先对 Flips 展开工作
12401240
12411241249
1242124200:12:26,379 --> 00:12:28,947
@@ -1351,7 +1351,7 @@ And to do that, again, I Control+drag from flips right
13511351271
1352135200:13:27,807 --> 00:13:30,808
13531353here, to the thing I wanted to be in the center of,
1354- 我想要它位于其中心的东西,
1354+ 我想要它位于其中心的东西
13551355
13561356272
1357135700:13:30,876 --> 00:13:33,144
@@ -1496,7 +1496,7 @@ that encloses it. It could be anything as long as it's
14961496300
1497149700:14:51,457 --> 00:14:54,058
14981498pinned to the bottom and in the center. And we can
1499- 钉在底部和中央。
1499+ 钉在底部和中央
15001500
15011501301
1502150200:14:54,126 --> 00:14:56,160
@@ -1541,7 +1541,7 @@ Because it's size is not constrained.
15411541309
1542154200:15:15,147 --> 00:15:17,482
15431543It's not pinned to anything, only its location. So,
1544- 并没有钉到任何东西上,只有它的位置是。
1544+ 并没有钉到任何东西上,只有它的位置是
15451545
15461546310
1547154700:15:17,550 --> 00:15:20,818
@@ -1686,7 +1686,7 @@ builder. Right, remember this button down here that showed
16861686338
1687168700:16:46,538 --> 00:16:49,373
16881688us all these phones? We can say, okay, what's this thing
1689- 所有的手机么?我们可以说,它在
1689+ 所有的手机么?我们可以说,它在
16901690
16911691339
1692169200:16:49,442 --> 00:16:52,810
@@ -1886,7 +1886,7 @@ Properties like flip count and tons of methods all the ones
18861886378
1887188700:18:49,862 --> 00:18:53,397
18881888in concentration in card and view controller. You learned
1889- Concentration Card ViewController 里所有的方法。
1889+ Concentration Card ViewController 里所有的方法
18901890
18911891379
1892189200:18:53,466 --> 00:18:56,367
@@ -1955,19 +1955,19 @@ remember that? You learned about initializers,
19551955
19561956392
1957195700:19:28,334 --> 00:19:31,001
1958- we had initializers both for Card
1958+ we had initializers both for Card
19591959对于 Card 和
19601960
19611961393
1962- 00:19:32,069 --> 00:19: 32,469
1962+ 00:19:32,069 --> 00:19:32,469
19631963and for Concentration
19641964Concentration来说
19651965
19661966394
1967196700:19:32,470 --> 00:19:33,870
19681968they each did different things to get
19691969我们都实现了构造器,它们每个都做了不同的事情来
1970-
1970+
19711971395
1972197200:19:33,940 --> 00:19:36,741
19731973themselves an initializer. We didn't do initializer for
@@ -2146,7 +2146,7 @@ things I'm gonna talk about here are just a little quick
21462146430
2147214700:21:13,873 --> 00:21:17,741
21482148minor things, asides. I mentioned doing a for
2149- 小事。我提到过用浮点数
2149+ 小事。我提到过用浮点数
21502150
21512151431
2152215200:21:17,810 --> 00:21:22,279
@@ -2216,7 +2216,7 @@ thing, and a by tells you what it strides by. Stride is
22162216444
2217221700:22:04,656 --> 00:22:08,492
22182218function that creates a countable range. Countable
2219- 是一个创建 CountableRange 的函数。
2219+ 是一个创建 CountableRange 的函数
22202220
22212221445
2222222200:22:08,561 --> 00:22:11,461
@@ -2256,7 +2256,7 @@ through 15.25, not to 15.25.
22562256452
2257225700:22:28,414 --> 00:22:31,581
22582258It creates one that goes over floats and knows to step by
2259- 它创建了一个知道以 0.3 为幅度跨越的浮点数区间,
2259+ 它创建了一个知道以 0.3 为幅度跨越的浮点数区间
22602260
22612261453
2262226200:22:31,650 --> 00:22:34,951
@@ -2301,7 +2301,7 @@ little data structure. And all that tuple is, essentially,,
23012301461
2302230200:22:55,641 --> 00:22:59,943
23032303like a mini struct that has no methods or vars or anything.
2304- 就像一个迷你的没有方法,变量的结构体
2304+ 就像一个迷你的没有方法,变量的结构体
23052305
23062306462
2307230700:23:00,012 --> 00:23:04,114
@@ -2522,7 +2522,7 @@ anything associated with it. It's also very good for
25222522505
2523252300:25:11,042 --> 00:25:14,945
25242524returning multiple values from a function. A function of
2525- 它也是非常好的。
2525+ 它也是非常好的
25262526
25272527506
2528252800:25:15,014 --> 00:25:17,781
@@ -2677,7 +2677,7 @@ But it is possible to declare foo like this,
26772677536
2678267800:26:48,474 --> 00:26:53,410
26792679foo Double open curly brace, get with the curly brace, set,
2680- for: Double { get {}
2680+ for: Double { get {}
26812681
26822682537
2683268300:26:53,478 --> 00:26:55,445
@@ -2797,7 +2797,7 @@ information in two different vars. Because they can get
27972797560
2798279800:28:09,955 --> 00:28:11,755
27992799out of sync, all kinds of problems happens, so
2800- 无法同步,还有各种各样的问题发生,
2800+ 无法同步,还有各种各样的问题发生
28012801
28022802561
2803280300:28:11,824 --> 00:28:14,257
@@ -2812,7 +2812,7 @@ from the other one. Here's an incredibly good example
28122812563
2813281300:28:17,829 --> 00:28:21,765
28142814indexOfOneAndOnlyFaceUpCard in concentration.
2815- Concentration 中的 indexOfOneAndOnlyFaceUpCard
2815+ Concentration 中的 indexOfOneAndOnlyFaceUpCard
28162816
28172817564
2818281800:28:21,833 --> 00:28:26,736
@@ -2919,7 +2919,7 @@ should've in the first place, all right?
29192919So let's go back here to Xcode,
29202920我们回到 Xcode
29212921
2922- 585
2922+ 585
2923292300:29:30,769 --> 00:29:33,971
29242924here we go bring our code back up, get rid of that.
29252925把我们的代码拿回来,摆脱掉它
@@ -3166,7 +3166,7 @@ see if I can find one that's gonna be the one I found.
31663166
31673167634
3168316800:32:05,691 --> 00:32:07,490
3169- So I'm gonna use a for loop here
3169+ So I'm gonna use a for loop here
31703170所以我要使用一个 for 循环
31713171
31723172635
@@ -3237,7 +3237,7 @@ FaceUpCards then obviously the index of the one and
32373237648
3238323800:32:49,968 --> 00:32:53,270
32393239only FaceUpCard is nil, there's no such thing. And
3240- 是 nil,这里没有这样的东西。
3240+ 是 nil,这里没有这样的东西
32413241
32423242649
3243324300:32:53,339 --> 00:32:55,371
@@ -3332,7 +3332,7 @@ for most cards. But in case the index here,
33323332667
3333333300:33:50,395 --> 00:33:54,264
33343334this index equals the new value of this, then I'm gonna
3335- 它等于 newValue,
3335+ 它等于 newValue
33363336
33373337668
3338333800:33:54,332 --> 00:33:59,369
@@ -3643,7 +3643,7 @@ another data structure. But if you were doing a lot of work
36433643729
3644364400:36:56,481 --> 00:36:58,114
36453645then you probably want to do set and
3646- 那么你可能想要做 set 和 get
3646+ 那么你可能想要做 set 和 get
36473647
36483648730
3649364900:36:58,182 --> 00:37:01,651
@@ -3654,7 +3654,7 @@ get to make it clear. But otherwise if it is
36543654731
3655365500:37:01,720 --> 00:37:06,322
36563656a var if it seems like a var make it a var. Good question.
3657- 如果它看起来是一个变量就让它成为一个变量。非常好的问题。
3657+ 如果它看起来是一个变量就让它成为一个变量。非常好的问题
36583658
36593659732
3660366000:37:06,391 --> 00:37:09,892
@@ -5263,7 +5263,7 @@ then just put the thing you want in there.
52635263
526452641053
5265526500:53:46,623 --> 00:53:51,560
5266- Now, it has one very some serious restriction which is
5266+ Now, it has one very some serious restriction which is
52675267但是有一个限制是
52685268
526952691054
@@ -5579,7 +5579,7 @@ I put this var arc4random. I have to say what type it is,
557955791116
5580558000:57:24,374 --> 00:57:27,175
55815581it's also gonna be an int. It could could be a string or
5582- 它也是 Int 类型的。扩展里的变量也可以是 String
5582+ 它也是 Int 类型的。扩展里的变量也可以是 String
55835583
558455841117
5585558500:57:27,244 --> 00:57:29,411
0 commit comments