@@ -6637,226 +6637,282 @@ that thing and inspect it.
6637
6637
1601
6638
6638
01:11:49,239 --> 01:11:52,173
6639
6639
Cuz you don't wanna set this thing right here which
6640
+ 因为你不想要将这东西放置在此因为
6640
6641
6641
6642
1602
6642
6643
01:11:52,242 --> 01:11:53,841
6643
6644
is the identifier.
6645
+ 是验证程序
6644
6646
6645
6647
1603
6646
6648
01:11:53,910 --> 01:11:56,677
6647
6649
Every segue has an identifier, it's just the string and
6650
+ 每一个转场都有一个验证程序,这只是一个字符串且
6648
6651
6649
6652
1604
6650
6653
01:11:56,745 --> 01:12:00,013
6651
6654
that identifier is what's you're gonna use in your code
6655
+ 这个验证程序是你在代码中要用到的
6652
6656
6653
6657
1605
6654
6658
01:12:00,082 --> 01:12:02,649
6655
6659
to talk about this segue.
6660
+ 与转场进行互动
6656
6661
6657
6662
1606
6658
6663
01:12:02,718 --> 01:12:04,252
6659
6664
And I'll talk about what you've
6665
+ 接下来我要谈到的是你们之前
6660
6666
6661
6667
1607
6662
6668
01:12:04,320 --> 01:12:07,120
6663
6669
been talk about regarding segues, any moment here.
6670
+ 已经谈论过的 转场,任何时候
6664
6671
6665
6672
1608
6666
6673
01:12:07,189 --> 01:12:08,389
6667
6674
So always set that.
6675
+ 所以总是需要放置它
6668
6676
6669
6677
1609
6670
6678
01:12:08,457 --> 01:12:09,223
6671
6679
And you wanna set it,
6680
+ 且你会想要放置它的,
6672
6681
6673
6682
1610
6674
6683
01:12:09,291 --> 01:12:12,059
6675
6684
the identifier to be something that kind of says what is
6685
+ 这个验证程序就好比像是在告诉你
6676
6686
6677
6687
1611
6678
6688
01:12:12,128 --> 01:12:12,660
6679
6689
segue does.
6690
+ 转场的作用是什么
6680
6691
6681
6692
1612
6682
6693
01:12:12,729 --> 01:12:14,995
6683
6694
So in this case it shows a graph, so
6695
+ 所以在这里展示了一个图像,那么
6684
6696
6685
6697
1613
6686
6698
01:12:15,064 --> 01:12:16,764
6687
6699
I call this show graph.
6700
+ 我称之为图像显示
6688
6701
6689
6702
1614
6690
6703
01:12:19,802 --> 01:12:22,236
6691
6704
That's how you set up your segue.
6705
+ 这就是你如何放置转场效果
6692
6706
6693
6707
1615
6694
6708
01:12:22,304 --> 01:12:24,204
6695
6709
And that's true for navigation controller as well.
6710
+ 同样也适用于导航控制器
6696
6711
6697
6712
1616
6698
6713
01:12:24,273 --> 01:12:25,673
6699
6714
If you have a navigation controller and
6715
+ 如果你有一个导航控制器且
6700
6716
6701
6717
1617
6702
6718
01:12:25,742 --> 01:12:28,209
6703
6719
you have a button that causes another card to slide on you
6720
+ 你有一个按钮能让另一个页面被滑动
6704
6721
6705
6722
1618
6706
6723
01:12:28,278 --> 01:12:30,445
6707
6724
just control drag from that button to the other MVC.
6725
+ 只需按住control然后从按钮中拖拽到其它的MVC
6708
6726
6709
6727
1619
6710
6728
01:12:30,513 --> 01:12:33,915
6711
6729
And then you use a show segue, and it'll just work.
6730
+ 然后你用到了转场展示,然后就完成了
6712
6731
6713
6732
1620
6714
6733
01:12:33,983 --> 01:12:35,049
6715
6734
Has to be all inside,
6735
+ 所有的都应该在这了,
6716
6736
6717
6737
1621
6718
6738
01:12:35,117 --> 01:12:37,751
6719
6739
embedded in navigation controller, of course.
6740
+ 导航控制器,当然
6720
6741
6721
6742
1622
6722
6743
01:12:37,820 --> 01:12:39,720
6723
6744
So what can you do with these identifiers?
6745
+ 所以你可以用这些验证程序来做什么呢?
6724
6746
6725
6747
1623
6726
6748
01:12:39,789 --> 01:12:42,457
6727
6749
It is actually possible to cause a segue to happen from
6750
+ 这个(验证程序)能真正的实现转场效果通过
6728
6751
6729
6752
1624
6730
6753
01:12:42,525 --> 01:12:45,425
6731
6754
code, with performSegue withIdentifier, but
6755
+ 代码的方式,with performSegue withIdentifier,但
6732
6756
6733
6757
1625
6734
6758
01:12:45,494 --> 01:12:47,961
6735
6759
I'm not gonna talk about that, cuz we're never gonna do that.
6760
+ 我并不打算讨论那些,因为我们永远也不会用到
6736
6761
6737
6762
1626
6738
6763
01:12:48,030 --> 01:12:49,329
6739
6764
We always gonna have buttons,
6765
+ 我们总是会有多个按钮,
6740
6766
6741
6767
1627
6742
6768
01:12:49,398 --> 01:12:50,764
6743
6769
well I'm not gonna say we're never gonna do that,
6770
+ 好吧我不应该说我们永远也不会用到,
6744
6771
6745
6772
1628
6746
6773
01:12:50,833 --> 01:12:52,767
6747
6774
but we won't be doing that in your assignment three,
6775
+ 但我们在第三节课程中还暂时不会用到,
6748
6776
6749
6777
1629
6750
6778
01:12:52,835 --> 01:12:53,267
6751
6779
that's for sure.
6780
+ 这是肯定的
6752
6781
6753
6782
1630
6754
6783
01:12:53,336 --> 01:12:54,301
6755
6784
It's pretty rare.
6785
+ 这非常重要
6756
6786
6757
6787
1631
6758
6788
01:12:54,370 --> 01:12:56,303
6759
6789
But you can do it with performSegue.
6790
+ 但你可以通过performSegue来做
6760
6791
6761
6792
1632
6762
6793
01:12:56,372 --> 01:12:59,006
6763
6794
But the more important use of the identifier is not causing
6795
+ 在使用验证程序中更重要的用法不是仅仅实现
6764
6796
6765
6797
1633
6766
6798
01:12:59,075 --> 01:13:00,774
6767
6799
segues to happen cuz segues kinda happen
6800
+ 转场因为转场效果的实现是
6768
6801
6769
6802
1634
6770
6803
01:13:00,843 --> 01:13:02,643
6771
6804
automatically when the buttons are pressed.
6805
+ 当按下按钮时自动实现的
6772
6806
6773
6807
1635
6774
6808
01:13:02,712 --> 01:13:04,645
6775
6809
It's to prepare for a segue.
6810
+ 这是为转场准备的
6776
6811
6777
6812
1636
6778
6813
01:13:04,714 --> 01:13:08,148
6779
6814
This is the most important method in all of
6815
+ 这是最重要的方法在所有的
6780
6816
6781
6817
1637
6782
6818
01:13:08,217 --> 01:13:11,552
6783
6819
multiple MVC programming is this preparing for segue
6820
+ 多点MVC编程中,这是为转场准备的
6784
6821
6785
6822
1638
6786
6823
01:13:11,620 --> 01:13:15,489
6787
6824
method which I'm gonna show you in a moment here, okay.
6825
+ 方法接下来我将要向你们在这展示下,
6788
6826
6789
6827
1639
6790
6828
01:13:15,558 --> 01:13:18,058
6791
6829
And remember, we're all segueing to a new MVC
6830
+ 别忘了,我们都通过转场到新的MVC
6792
6831
6793
6832
1640
6794
6833
01:13:18,127 --> 01:13:20,227
6795
6834
freshly created, so it's always raw.
6835
+ 新建,那么它总是
6796
6836
6797
6837
1641
6798
6838
01:13:20,296 --> 01:13:22,830
6799
6839
So we have to prepare it to do what it's going to do.
6840
+ 所以我们需要让其准备好我们要做的
6800
6841
6801
6842
1642
6802
6843
01:13:24,734 --> 01:13:25,466
6803
6844
Here is the method.
6845
+ 方法这样写
6804
6846
6805
6847
1643
6806
6848
01:13:25,534 --> 01:13:27,334
6807
6849
It's called prepare for segue, and
6850
+ 这称作为准备转场,且
6808
6851
6809
6852
1644
6810
6853
01:13:27,403 --> 01:13:30,972
6811
6854
it also has a sender argument right there.
6855
+ 这里还有一个传送协议
6812
6856
6813
6857
1645
6814
6858
01:13:31,040 --> 01:13:34,375
6815
6859
The segue that's passed along that first argument
6860
+ 转场效果要通过的第一个协议
6816
6861
6817
6862
1646
6818
6863
01:13:34,444 --> 01:13:37,611
6819
6864
is just a little container that contains interesting
6865
+ 只是一个小的容器其包含了有趣的
6820
6866
6821
6867
1647
6822
6868
01:13:37,680 --> 01:13:39,613
6823
6869
information about the segue.
6870
+ 关于转场的信息
6824
6871
6825
6872
1648
6826
6873
01:13:39,682 --> 01:13:42,049
6827
6874
For example, the identifier, Show Graph.
6875
+ 例如,验证程序,图像显示
6828
6876
6829
6877
1649
6830
6878
01:13:43,585 --> 01:13:47,187
6831
6879
And very importantly, the controller that you're seguing
6880
+ 然后很重要的一个地方,你用于转场的控制器
6832
6881
6833
6882
1650
6834
6883
01:13:47,256 --> 01:13:48,455
6835
6884
too, because the whole point is here,
6885
+ 也是重点,因为整个知识点就在这,
6836
6886
6837
6887
1651
6838
6888
01:13:48,524 --> 01:13:51,292
6839
6889
you're suppose to be preparing this MVC that's going to
6890
+ 你最好准备好这个MVC让它能
6840
6891
6841
6892
1652
6842
6893
01:13:51,360 --> 01:13:52,593
6843
6894
come on screen.
6895
+ 出现在屏幕上
6844
6896
6845
6897
1653
6846
6898
01:13:52,661 --> 01:13:53,794
6847
6899
To do its job so
6900
+ 为了能让其运作那么
6848
6901
6849
6902
1654
6850
6903
01:13:53,862 --> 01:13:57,431
6851
6904
you get that thing from this little segue object.
6905
+ 你要从这个小转场对象中得到那个东西( )
6852
6906
6853
6907
1655
6854
6908
01:13:57,499 --> 01:14:00,301
6855
6909
The sender is kinda like buttons,
6910
+ 传感器有点像按钮,
6856
6911
6857
6912
1656
6858
6913
01:14:00,370 --> 01:14:02,636
6859
6914
the button sender when we had the action there.
6915
+ 当我们有动作行为时按钮传感器
6860
6916
6861
6917
1657
6862
6918
01:14:02,705 --> 01:14:05,505
0 commit comments