@@ -6637,226 +6637,282 @@ that thing and inspect it.
663766371601
6638663801:11:49,239 --> 01:11:52,173
66396639Cuz you don't wanna set this thing right here which
6640+ 因为你不想要将这东西放置在此因为
66406641
664166421602
6642664301:11:52,242 --> 01:11:53,841
66436644is the identifier.
6645+ 是验证程序
66446646
664566471603
6646664801:11:53,910 --> 01:11:56,677
66476649Every segue has an identifier, it's just the string and
6650+ 每一个转场都有一个验证程序,这只是一个字符串且
66486651
664966521604
6650665301:11:56,745 --> 01:12:00,013
66516654that identifier is what's you're gonna use in your code
6655+ 这个验证程序是你在代码中要用到的
66526656
665366571605
6654665801:12:00,082 --> 01:12:02,649
66556659to talk about this segue.
6660+ 与转场进行互动
66566661
665766621606
6658666301:12:02,718 --> 01:12:04,252
66596664And I'll talk about what you've
6665+ 接下来我要谈到的是你们之前
66606666
666166671607
6662666801:12:04,320 --> 01:12:07,120
66636669been talk about regarding segues, any moment here.
6670+ 已经谈论过的 转场,任何时候
66646671
666566721608
6666667301:12:07,189 --> 01:12:08,389
66676674So always set that.
6675+ 所以总是需要放置它
66686676
666966771609
6670667801:12:08,457 --> 01:12:09,223
66716679And you wanna set it,
6680+ 且你会想要放置它的,
66726681
667366821610
6674668301:12:09,291 --> 01:12:12,059
66756684the identifier to be something that kind of says what is
6685+ 这个验证程序就好比像是在告诉你
66766686
667766871611
6678668801:12:12,128 --> 01:12:12,660
66796689segue does.
6690+ 转场的作用是什么
66806691
668166921612
6682669301:12:12,729 --> 01:12:14,995
66836694So in this case it shows a graph, so
6695+ 所以在这里展示了一个图像,那么
66846696
668566971613
6686669801:12:15,064 --> 01:12:16,764
66876699I call this show graph.
6700+ 我称之为图像显示
66886701
668967021614
6690670301:12:19,802 --> 01:12:22,236
66916704That's how you set up your segue.
6705+ 这就是你如何放置转场效果
66926706
669367071615
6694670801:12:22,304 --> 01:12:24,204
66956709And that's true for navigation controller as well.
6710+ 同样也适用于导航控制器
66966711
669767121616
6698671301:12:24,273 --> 01:12:25,673
66996714If you have a navigation controller and
6715+ 如果你有一个导航控制器且
67006716
670167171617
6702671801:12:25,742 --> 01:12:28,209
67036719you have a button that causes another card to slide on you
6720+ 你有一个按钮能让另一个页面被滑动
67046721
670567221618
6706672301:12:28,278 --> 01:12:30,445
67076724just control drag from that button to the other MVC.
6725+ 只需按住control然后从按钮中拖拽到其它的MVC
67086726
670967271619
6710672801:12:30,513 --> 01:12:33,915
67116729And then you use a show segue, and it'll just work.
6730+ 然后你用到了转场展示,然后就完成了
67126731
671367321620
6714673301:12:33,983 --> 01:12:35,049
67156734Has to be all inside,
6735+ 所有的都应该在这了,
67166736
671767371621
6718673801:12:35,117 --> 01:12:37,751
67196739embedded in navigation controller, of course.
6740+ 导航控制器,当然
67206741
672167421622
6722674301:12:37,820 --> 01:12:39,720
67236744So what can you do with these identifiers?
6745+ 所以你可以用这些验证程序来做什么呢?
67246746
672567471623
6726674801:12:39,789 --> 01:12:42,457
67276749It is actually possible to cause a segue to happen from
6750+ 这个(验证程序)能真正的实现转场效果通过
67286751
672967521624
6730675301:12:42,525 --> 01:12:45,425
67316754code, with performSegue withIdentifier, but
6755+ 代码的方式,with performSegue withIdentifier,但
67326756
673367571625
6734675801:12:45,494 --> 01:12:47,961
67356759I'm not gonna talk about that, cuz we're never gonna do that.
6760+ 我并不打算讨论那些,因为我们永远也不会用到
67366761
673767621626
6738676301:12:48,030 --> 01:12:49,329
67396764We always gonna have buttons,
6765+ 我们总是会有多个按钮,
67406766
674167671627
6742676801:12:49,398 --> 01:12:50,764
67436769well I'm not gonna say we're never gonna do that,
6770+ 好吧我不应该说我们永远也不会用到,
67446771
674567721628
6746677301:12:50,833 --> 01:12:52,767
67476774but we won't be doing that in your assignment three,
6775+ 但我们在第三节课程中还暂时不会用到,
67486776
674967771629
6750677801:12:52,835 --> 01:12:53,267
67516779that's for sure.
6780+ 这是肯定的
67526781
675367821630
6754678301:12:53,336 --> 01:12:54,301
67556784It's pretty rare.
6785+ 这非常重要
67566786
675767871631
6758678801:12:54,370 --> 01:12:56,303
67596789But you can do it with performSegue.
6790+ 但你可以通过performSegue来做
67606791
676167921632
6762679301:12:56,372 --> 01:12:59,006
67636794But the more important use of the identifier is not causing
6795+ 在使用验证程序中更重要的用法不是仅仅实现
67646796
676567971633
6766679801:12:59,075 --> 01:13:00,774
67676799segues to happen cuz segues kinda happen
6800+ 转场因为转场效果的实现是
67686801
676968021634
6770680301:13:00,843 --> 01:13:02,643
67716804automatically when the buttons are pressed.
6805+ 当按下按钮时自动实现的
67726806
677368071635
6774680801:13:02,712 --> 01:13:04,645
67756809It's to prepare for a segue.
6810+ 这是为转场准备的
67766811
677768121636
6778681301:13:04,714 --> 01:13:08,148
67796814This is the most important method in all of
6815+ 这是最重要的方法在所有的
67806816
678168171637
6782681801:13:08,217 --> 01:13:11,552
67836819multiple MVC programming is this preparing for segue
6820+ 多点MVC编程中,这是为转场准备的
67846821
678568221638
6786682301:13:11,620 --> 01:13:15,489
67876824method which I'm gonna show you in a moment here, okay.
6825+ 方法接下来我将要向你们在这展示下,
67886826
678968271639
6790682801:13:15,558 --> 01:13:18,058
67916829And remember, we're all segueing to a new MVC
6830+ 别忘了,我们都通过转场到新的MVC
67926831
679368321640
6794683301:13:18,127 --> 01:13:20,227
67956834freshly created, so it's always raw.
6835+ 新建,那么它总是
67966836
679768371641
6798683801:13:20,296 --> 01:13:22,830
67996839So we have to prepare it to do what it's going to do.
6840+ 所以我们需要让其准备好我们要做的
68006841
680168421642
6802684301:13:24,734 --> 01:13:25,466
68036844Here is the method.
6845+ 方法这样写
68046846
680568471643
6806684801:13:25,534 --> 01:13:27,334
68076849It's called prepare for segue, and
6850+ 这称作为准备转场,且
68086851
680968521644
6810685301:13:27,403 --> 01:13:30,972
68116854it also has a sender argument right there.
6855+ 这里还有一个传送协议
68126856
681368571645
6814685801:13:31,040 --> 01:13:34,375
68156859The segue that's passed along that first argument
6860+ 转场效果要通过的第一个协议
68166861
681768621646
6818686301:13:34,444 --> 01:13:37,611
68196864is just a little container that contains interesting
6865+ 只是一个小的容器其包含了有趣的
68206866
682168671647
6822686801:13:37,680 --> 01:13:39,613
68236869information about the segue.
6870+ 关于转场的信息
68246871
682568721648
6826687301:13:39,682 --> 01:13:42,049
68276874For example, the identifier, Show Graph.
6875+ 例如,验证程序,图像显示
68286876
682968771649
6830687801:13:43,585 --> 01:13:47,187
68316879And very importantly, the controller that you're seguing
6880+ 然后很重要的一个地方,你用于转场的控制器
68326881
683368821650
6834688301:13:47,256 --> 01:13:48,455
68356884too, because the whole point is here,
6885+ 也是重点,因为整个知识点就在这,
68366886
683768871651
6838688801:13:48,524 --> 01:13:51,292
68396889you're suppose to be preparing this MVC that's going to
6890+ 你最好准备好这个MVC让它能
68406891
684168921652
6842689301:13:51,360 --> 01:13:52,593
68436894come on screen.
6895+ 出现在屏幕上
68446896
684568971653
6846689801:13:52,661 --> 01:13:53,794
68476899To do its job so
6900+ 为了能让其运作那么
68486901
684969021654
6850690301:13:53,862 --> 01:13:57,431
68516904you get that thing from this little segue object.
6905+ 你要从这个小转场对象中得到那个东西( )
68526906
685369071655
6854690801:13:57,499 --> 01:14:00,301
68556909The sender is kinda like buttons,
6910+ 传感器有点像按钮,
68566911
685769121656
6858691301:14:00,370 --> 01:14:02,636
68596914the button sender when we had the action there.
6915+ 当我们有动作行为时按钮传感器
68606916
686169171657
6862691801:14:02,705 --> 01:14:05,505
0 commit comments