-
Notifications
You must be signed in to change notification settings - Fork 48
/
217.srt
5629 lines (4134 loc) · 123 KB
/
217.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:00.506 --> 00:00:08.516 A:middle
[ Silence ]
00:00:09.016 --> 00:00:14.000 A:middle
[ Applause ]
00:00:15.366 --> 00:00:15.846 A:middle
>> Good morning.
00:00:17.216 --> 00:00:19.586 A:middle
Thanks for coming out for
another UIScrollView session
00:00:19.586 --> 00:00:19.946 A:middle
this year.
00:00:20.426 --> 00:00:22.346 A:middle
For those of you keeping track,
00:00:22.346 --> 00:00:25.366 A:middle
this is actually our fifth
UIScrollView session in a row.
00:00:25.866 --> 00:00:29.346 A:middle
[applause].
00:00:29.846 --> 00:00:32.286 A:middle
So we've talked about a lot
of great stuff over the years.
00:00:32.646 --> 00:00:34.826 A:middle
And-- So some of you
might be thinking,
00:00:35.846 --> 00:00:37.636 A:middle
"What could they
possibly have left to talk
00:00:37.636 --> 00:00:39.146 A:middle
about with ScrollView
this year?"
00:00:40.226 --> 00:00:41.446 A:middle
But, rest assured,
00:00:41.446 --> 00:00:44.566 A:middle
that ScrollViews are an
incredibly versatile class
00:00:44.566 --> 00:00:46.656 A:middle
and there's a lot of
stuff left to discuss
00:00:46.706 --> 00:00:47.776 A:middle
that you can do with this stuff.
00:00:48.566 --> 00:00:50.866 A:middle
So, if you're familiar with
the structure that viewed
00:00:50.866 --> 00:00:53.346 A:middle
in previous years, you
probably know that we're going
00:00:53.346 --> 00:00:55.856 A:middle
to spend some time going
pretty deep into a couple
00:00:55.856 --> 00:00:57.516 A:middle
of specific examples of things
00:00:57.516 --> 00:00:58.866 A:middle
that you can do with
ScrollViews.
00:00:59.356 --> 00:01:01.176 A:middle
And we're going to do that
again this year and we'll get
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:59.356 --> 00:01:01.176 A:middle
And we're going to do that
again this year and we'll get
00:01:01.176 --> 00:01:02.146 A:middle
to that in just a minute.
00:01:02.716 --> 00:01:03.856 A:middle
But before we do, I want
00:01:03.856 --> 00:01:06.526 A:middle
to do something a little bit
different this year and kind
00:01:06.526 --> 00:01:10.096 A:middle
of take a step back and look
through iOS 7's new interfaces
00:01:10.506 --> 00:01:13.576 A:middle
and see how we're using
UIScrollViews in some new ways
00:01:13.906 --> 00:01:16.556 A:middle
that you might not necessarily
have expected we'd be using
00:01:16.556 --> 00:01:19.536 A:middle
UIScrollViews for so you
can get some different ideas
00:01:19.536 --> 00:01:22.336 A:middle
about how you can use this
kind of stuff in your own apps
00:01:22.696 --> 00:01:25.056 A:middle
to create some interesting
different effects.
00:01:25.616 --> 00:01:26.666 A:middle
So let's get started.
00:01:27.746 --> 00:01:30.476 A:middle
The first thing that you see
anytime you start on your phone,
00:01:30.476 --> 00:01:31.846 A:middle
of course, is the Lock Screen.
00:01:32.646 --> 00:01:35.866 A:middle
And starting in iOS 7, the
first time that you turn
00:01:35.866 --> 00:01:39.976 A:middle
on your phone, every time, the
first that you'll do is interact
00:01:39.976 --> 00:01:41.006 A:middle
with the UIScrollView.
00:01:41.546 --> 00:01:44.826 A:middle
So, kind of big deal.
00:01:45.486 --> 00:01:48.726 A:middle
The Lock Screen is actually now
Slide to Unlock is implemented
00:01:48.726 --> 00:01:50.676 A:middle
as a two-paged paging
ScrollView.
00:01:51.196 --> 00:01:53.446 A:middle
So when we swipe over here
to the Passcode screen,
00:01:53.616 --> 00:01:55.416 A:middle
we're just paging
between two pages.
00:01:55.896 --> 00:01:57.716 A:middle
It's easy to imagine
how that's put together.
00:01:57.966 --> 00:02:00.216 A:middle
Over here on the right hand
side, we've got the first page
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:01:57.966 --> 00:02:00.216 A:middle
Over here on the right hand
side, we've got the first page
00:02:00.546 --> 00:02:02.326 A:middle
and we're just swiping back
and forth between them.
00:02:03.616 --> 00:02:07.216 A:middle
Now, even before we get into
unlocking, there's more uses
00:02:07.216 --> 00:02:09.485 A:middle
of UIScrollView defined right
here on the Lock Screen.
00:02:10.466 --> 00:02:12.426 A:middle
So of course, if I get
a notification saying
00:02:12.426 --> 00:02:15.946 A:middle
that I have a WWDC presentation
right now in Presidio,
00:02:16.576 --> 00:02:19.896 A:middle
that is itself in a
vertical scrolling list
00:02:19.976 --> 00:02:22.426 A:middle
because you might have multiple
notifications to scroll through.
00:02:22.986 --> 00:02:25.746 A:middle
Then that's embedded within
that outer paging ScrollView.
00:02:25.966 --> 00:02:27.516 A:middle
It's an embedded
vertical ScrollView.
00:02:28.326 --> 00:02:30.756 A:middle
Now there's actually even
more because each one
00:02:30.756 --> 00:02:34.596 A:middle
of those notifications is
itself embedded inside another
00:02:34.596 --> 00:02:36.096 A:middle
horizontal paging ScrollView.
00:02:36.986 --> 00:02:40.166 A:middle
So you might wonder why that is
and it's actually pretty easy
00:02:40.166 --> 00:02:41.776 A:middle
to see once we start
interacting with it.
00:02:42.156 --> 00:02:44.416 A:middle
When you swipe on an
individual notification,
00:02:44.946 --> 00:02:47.166 A:middle
that will take you
directly to the application
00:02:47.166 --> 00:02:48.696 A:middle
that generated that
notification.
00:02:49.176 --> 00:02:50.806 A:middle
So if we start interacting
with this one,
00:02:51.096 --> 00:02:53.536 A:middle
you'll find that we can drag
it a little bit on its own,
00:02:53.856 --> 00:02:55.806 A:middle
but eventually it'll
catch the outer ScrollView
00:02:55.806 --> 00:02:57.216 A:middle
and start pulling
it along with it.
00:02:57.216 --> 00:02:59.226 A:middle
And then if we let
go, it just comes back
00:02:59.226 --> 00:03:00.136 A:middle
to rest at the beginning.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:02:59.226 --> 00:03:00.136 A:middle
to rest at the beginning.
00:03:00.776 --> 00:03:02.276 A:middle
If we were to finish
that gesture,
00:03:02.486 --> 00:03:04.046 A:middle
we would be scrolling
the inner ScrollView
00:03:04.046 --> 00:03:07.516 A:middle
for a bit then we would catch
the outer one and pull both
00:03:07.516 --> 00:03:09.276 A:middle
of them over on to
the Passcode screen.
00:03:10.406 --> 00:03:13.446 A:middle
So this is a pretty interesting
effect being generated
00:03:13.446 --> 00:03:15.396 A:middle
by multiple Nested ScrollViews.
00:03:15.596 --> 00:03:17.776 A:middle
And this is actually the first
technique that we're going
00:03:17.776 --> 00:03:20.146 A:middle
to look at today and
go into a lot of depth
00:03:20.146 --> 00:03:22.376 A:middle
on how exactly that
was implemented.
00:03:22.716 --> 00:03:25.016 A:middle
So, we'll show you the
construction of the views
00:03:25.316 --> 00:03:27.396 A:middle
and see how we make those
ScrollViews interact to get
00:03:27.396 --> 00:03:29.336 A:middle
that behavior where
one pulls the other.
00:03:29.946 --> 00:03:31.746 A:middle
But before we get to
that, we're going to look
00:03:31.806 --> 00:03:34.656 A:middle
through a few more examples in
iOS 7 of this kind of thing.
00:03:35.146 --> 00:03:36.756 A:middle
So let's unlock the
phone and take a look
00:03:36.756 --> 00:03:39.196 A:middle
at some more examples
of Nesting ScrollViews.
00:03:39.926 --> 00:03:42.366 A:middle
So right here on the home
screen, I'm sure as you remember
00:03:42.366 --> 00:03:45.036 A:middle
in the past, we used
to have spotlight
00:03:45.566 --> 00:03:48.116 A:middle
over on the left hand page
of our paging ScrollView.
00:03:48.626 --> 00:03:51.386 A:middle
In iOS 7, it's moved up to
the top and that's implemented
00:03:51.386 --> 00:03:54.366 A:middle
as a Nested ScrollView inside
the outer paging ScrollView.
00:03:55.846 --> 00:03:59.546 A:middle
Moving into the multitasking
user interface, we can now find
00:03:59.546 --> 00:04:03.666 A:middle
that the way that we kill
applications in iOS 7-- oops.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:03:59.546 --> 00:04:03.666 A:middle
that the way that we kill
applications in iOS 7-- oops.
00:04:04.836 --> 00:04:08.466 A:middle
The way that we kill running
applications in iOS7 is
00:04:08.466 --> 00:04:11.786 A:middle
by taking this interface and
scrolling it and flicking it
00:04:11.786 --> 00:04:12.966 A:middle
up off the top of the screen.
00:04:13.596 --> 00:04:16.166 A:middle
That is also now a
Nested UIScrollView.
00:04:16.776 --> 00:04:19.466 A:middle
Now, the interesting thing about
these Nested ScrollViews is
00:04:19.466 --> 00:04:22.005 A:middle
that we get a really
consistent experience throughout
00:04:22.005 --> 00:04:22.916 A:middle
the interface.
00:04:23.246 --> 00:04:24.966 A:middle
Every different place
that we see this kind
00:04:24.966 --> 00:04:27.866 A:middle
of interaction feels the same
way, has the same bounce,
00:04:28.146 --> 00:04:29.486 A:middle
has the same deceleration.
00:04:29.996 --> 00:04:33.436 A:middle
It really just makes everything
feel natural and consistent
00:04:33.436 --> 00:04:35.196 A:middle
across the entire
operating system.
00:04:35.706 --> 00:04:37.696 A:middle
So if you're looking at
doing any of these kinds
00:04:37.696 --> 00:04:39.426 A:middle
of interactions, I
would encourage you
00:04:39.426 --> 00:04:41.406 A:middle
to consider using a
UIScrollView to build it
00:04:41.716 --> 00:04:43.436 A:middle
because you'll get the
same feel that you have
00:04:43.436 --> 00:04:45.756 A:middle
across all the other
parts of iOS 7.
00:04:47.156 --> 00:04:49.296 A:middle
So Nesting ScrollViews,
that's a pretty common one.
00:04:49.636 --> 00:04:52.616 A:middle
Another thing that we found
has cropped up in a number
00:04:52.616 --> 00:04:56.496 A:middle
of different apps on iOS 7 is
multiple ScrollViews that scroll
00:04:56.496 --> 00:04:58.426 A:middle
through the same content
at different rates.
00:04:59.086 --> 00:05:00.626 A:middle
So again here in
the multitasking UI,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:04:59.086 --> 00:05:00.626 A:middle
So again here in
the multitasking UI,
00:05:01.216 --> 00:05:03.346 A:middle
you can see that there are
actually two independent
00:05:03.456 --> 00:05:04.526 A:middle
sections of content.
00:05:04.786 --> 00:05:07.806 A:middle
Up at the top, we've got
the individual snapshot
00:05:07.806 --> 00:05:10.246 A:middle
of the applications and we
can scroll through those.
00:05:10.526 --> 00:05:12.266 A:middle
And down at the bottom,
we have their icons.
00:05:12.696 --> 00:05:14.376 A:middle
Now, as we scroll
through the top part,
00:05:14.626 --> 00:05:16.706 A:middle
we'll move fairly slowly
because we're moving
00:05:16.766 --> 00:05:18.496 A:middle
through those images.
00:05:18.786 --> 00:05:20.886 A:middle
But you'll notice that at the
bottom, the icons kind of group
00:05:20.886 --> 00:05:23.166 A:middle
up and now we see
more of them at once.
00:05:23.546 --> 00:05:25.536 A:middle
What that allows us to do
is scroll at the bottom
00:05:25.536 --> 00:05:27.986 A:middle
at a faster rate to get
through things more quickly.
00:05:28.606 --> 00:05:30.756 A:middle
So, two different
ScrollViews scrolling
00:05:30.756 --> 00:05:32.826 A:middle
through the same content
at different rates.
00:05:33.586 --> 00:05:35.116 A:middle
Another place where
we find that kind
00:05:35.116 --> 00:05:37.646 A:middle
of thing implemented is here
in the Calendar application.
00:05:38.186 --> 00:05:40.686 A:middle
So we can page through the
paging ScrollView at the bottom
00:05:40.686 --> 00:05:42.476 A:middle
which represents that
days of the week.
00:05:42.796 --> 00:05:44.916 A:middle
And as we do that, we
go one day at a time.
00:05:45.226 --> 00:05:47.436 A:middle
We can see all the days
and go nice and slow.
00:05:47.996 --> 00:05:50.406 A:middle
If we want to go faster,
we can scroll up at the top
00:05:50.656 --> 00:05:52.606 A:middle
where those numbers are,
and that would let us,
00:05:52.606 --> 00:05:55.226 A:middle
with one gesture, move
an entire week back
00:05:55.456 --> 00:05:58.006 A:middle
with what otherwise had taken
us seven swipes to get through.
00:05:59.246 --> 00:06:01.696 A:middle
So this idea of multiple
ScrollViews scrolling
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:05:59.246 --> 00:06:01.696 A:middle
So this idea of multiple
ScrollViews scrolling
00:06:01.696 --> 00:06:04.106 A:middle
through the same content at
different rates is showing
00:06:04.106 --> 00:06:05.346 A:middle
up in a number of
different places.
00:06:05.586 --> 00:06:07.476 A:middle
It might be something that you
might want to consider putting
00:06:07.476 --> 00:06:08.526 A:middle
into your own applications
00:06:08.876 --> 00:06:10.266 A:middle
if there's appropriate
places for that.
00:06:11.336 --> 00:06:12.426 A:middle
Another thing I want
to take a look
00:06:12.426 --> 00:06:15.626 A:middle
at here is some custom
content transforms
00:06:15.866 --> 00:06:17.416 A:middle
that are being applied
to different pieces
00:06:17.416 --> 00:06:19.456 A:middle
of content inside UIScrollViews.
00:06:20.146 --> 00:06:22.046 A:middle
So, the first one that I'd
like to take a look at is here
00:06:22.046 --> 00:06:23.106 A:middle
in the Clock application.
00:06:24.596 --> 00:06:30.636 A:middle
What you'll find is that there's
the 3D Transform being applied
00:06:30.636 --> 00:06:32.116 A:middle
to the numbers as we scroll
00:06:32.116 --> 00:06:35.286 A:middle
through on the right
hand side there.
00:06:35.506 --> 00:06:37.746 A:middle
This has always looked
vaguely 3D.
00:06:37.966 --> 00:06:41.776 A:middle
But in iOS 7, this is actually a
3D wheel being constructed using
00:06:41.776 --> 00:06:44.006 A:middle
3D Transforms on
[inaudible] layers.
00:06:44.726 --> 00:06:47.426 A:middle
Now, this is still the exact
same scrolling behaviors
00:06:47.426 --> 00:06:50.686 A:middle
that you expect across the
operating system, the same feel
00:06:50.686 --> 00:06:52.156 A:middle
of movement, same deceleration,
00:06:52.416 --> 00:06:54.126 A:middle
it's just that there's
some transforms applied
00:06:54.126 --> 00:06:56.616 A:middle
to the content to give an
interesting visual effect
00:06:56.946 --> 00:06:59.186 A:middle
that makes it unique in
this particular location.
00:06:59.996 --> 00:07:02.706 A:middle
Another example of this kind of
thing can be found in Safari.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:06:59.996 --> 00:07:02.706 A:middle
Another example of this kind of
thing can be found in Safari.
00:07:03.236 --> 00:07:06.176 A:middle
If we go into the new Tab
Switcher interface in Safari,
00:07:06.526 --> 00:07:08.446 A:middle
you'll find that as you
scroll, some of the tabs
00:07:08.446 --> 00:07:11.026 A:middle
at the top start to pull out
of the screen towards you.
00:07:11.586 --> 00:07:13.456 A:middle
Now again, this is
just a UIScrollView
00:07:13.676 --> 00:07:16.356 A:middle
but we're applying Transforms
on the content while we scroll
00:07:16.356 --> 00:07:19.186 A:middle
to give this other interesting
visual effect that's unique
00:07:19.186 --> 00:07:20.106 A:middle
to this application.
00:07:20.726 --> 00:07:24.366 A:middle
One last place where we see this
kind of technique being used is
00:07:24.366 --> 00:07:25.686 A:middle
in the Passbook application.
00:07:26.106 --> 00:07:27.416 A:middle
As we scroll within passes,
00:07:27.416 --> 00:07:28.826 A:middle
they're bunching
up near the top.
00:07:28.826 --> 00:07:31.336 A:middle
And then as we pull down and
it rubber bands, they stretch
00:07:31.336 --> 00:07:33.016 A:middle
out from one another
a little bit.
00:07:33.376 --> 00:07:36.106 A:middle
Again, just a UIScrollView,
we have the exact same feel
00:07:36.106 --> 00:07:39.626 A:middle
of the bouncing, but we get an
interesting visual effect unique
00:07:39.626 --> 00:07:40.496 A:middle
to the Passbook app.
00:07:41.236 --> 00:07:43.636 A:middle
So, all of these techniques
are fairly easy to implement
00:07:43.636 --> 00:07:45.296 A:middle
by just applying
different Transforms
00:07:45.326 --> 00:07:48.156 A:middle
to the content while you're
scrolling in your UIScrollView.
00:07:48.746 --> 00:07:51.616 A:middle
Now the last thing I want to
take a look at before we get
00:07:51.616 --> 00:07:53.616 A:middle
into the specific examples
of implementing some
00:07:53.616 --> 00:07:55.866 A:middle
of this stuff is the
Messages application.
00:07:56.596 --> 00:07:58.766 A:middle
I'm sure you've noticed as
you'd been using Messages
00:07:58.986 --> 00:08:01.876 A:middle
that when you go into a
conversation and you scroll
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:07:58.986 --> 00:08:01.876 A:middle
that when you go into a
conversation and you scroll
00:08:01.876 --> 00:08:03.756 A:middle
around it, the Chat
Bubbles have a little bit
00:08:03.756 --> 00:08:04.676 A:middle
of a bounce to them.
00:08:04.966 --> 00:08:07.236 A:middle
It gives it this really lively
feel as you're scrolling
00:08:07.236 --> 00:08:09.776 A:middle
around in this application and
it's really unique compared
00:08:09.776 --> 00:08:11.586 A:middle
to what you see in
other apps on iOS 7.
00:08:12.236 --> 00:08:14.196 A:middle
Now this is actually the second
thing that we're going to talk
00:08:14.196 --> 00:08:16.326 A:middle
about today and see
exactly how this kind
00:08:16.326 --> 00:08:17.356 A:middle
of thing can be implemented.
00:08:17.756 --> 00:08:20.316 A:middle
It's actually become
really easy to do in iOS 7
00:08:20.316 --> 00:08:22.656 A:middle
with the introduction of
the new UIKit Dynamics API.
00:08:23.336 --> 00:08:25.816 A:middle
So, we're going to get into
that just after we talk
00:08:25.856 --> 00:08:27.336 A:middle
through the first
Lock Screen example.
00:08:27.946 --> 00:08:30.306 A:middle
So, let's get into building
some of these things.
00:08:30.806 --> 00:08:33.785 A:middle
And as I mentioned, the
first thing we want to talk
00:08:33.785 --> 00:08:37.106 A:middle
about is the Lock Screen,
those Nested UIScrollViews.
00:08:37.756 --> 00:08:40.606 A:middle
So let's take a look at that
again just for a quick reminder
00:08:40.606 --> 00:08:42.076 A:middle
of how this is going
to be put together.
00:08:42.916 --> 00:08:44.346 A:middle
So we've got here
our Lock Screen.
00:08:45.066 --> 00:08:48.386 A:middle
On the left side, we've
got another page of content
00:08:48.386 --> 00:08:49.796 A:middle
which is the Passcode lock.
00:08:50.736 --> 00:08:53.456 A:middle
And of course, this is a paging
ScrollView with two pages
00:08:53.666 --> 00:08:55.906 A:middle
and our content size
is represented
00:08:56.596 --> 00:09:00.466 A:middle
by the width of those two pages.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:08:56.596 --> 00:09:00.466 A:middle
by the width of those two pages.
00:09:00.616 --> 00:09:04.026 A:middle
Now, that ScrollView is actually
a full screen UIScrollView
00:09:04.026 --> 00:09:05.506 A:middle
because it's going
to be scrolling all
00:09:05.506 --> 00:09:07.186 A:middle
of the content that's
visible on the screen.
00:09:08.636 --> 00:09:10.876 A:middle
Nested within that, we
have the notifications.
00:09:11.266 --> 00:09:13.006 A:middle
And that's a much
smaller UIScrollView
00:09:13.006 --> 00:09:15.706 A:middle
and it scrolls only vertically,
but it's here as a child
00:09:15.706 --> 00:09:17.106 A:middle
of that outer paging ScrollView.
00:09:17.106 --> 00:09:18.626 A:middle
And then as I mentioned,
00:09:18.626 --> 00:09:21.826 A:middle
each one of these is also its
own nested horizontal ScrollView
00:09:22.356 --> 00:09:23.326 A:middle
and they're a little bit smaller
00:09:23.326 --> 00:09:25.016 A:middle
because they're just
scrolling the individual
00:09:25.016 --> 00:09:26.066 A:middle
notification itself.
00:09:26.456 --> 00:09:27.786 A:middle
So we've got one
here for the top
00:09:27.786 --> 00:09:28.906 A:middle
and then another for the bottom.
00:09:28.906 --> 00:09:32.836 A:middle
Now as the user starts to
move their finger on this,
00:09:33.156 --> 00:09:35.136 A:middle
the content in that will
get pulled over to the point
00:09:35.136 --> 00:09:37.266 A:middle
where it's going to catch
that outer ScrollView.
00:09:37.976 --> 00:09:40.446 A:middle
As they finish their
gesture and finish scrolling
00:09:40.446 --> 00:09:43.106 A:middle
that inner page, it pulls
the outer one along with it
00:09:43.106 --> 00:09:44.876 A:middle
and gets us over
onto the Lock Screen.
00:09:45.406 --> 00:09:47.756 A:middle
Now, if you've used UIScrollView
before in your apps,
00:09:47.856 --> 00:09:49.176 A:middle
I'm sure you're familiar
with the fact
00:09:49.176 --> 00:09:51.806 A:middle
that ScrollViews will not
automatically start dragging
00:09:51.806 --> 00:09:53.356 A:middle
their outer containing
ScrollView
00:09:53.586 --> 00:09:55.226 A:middle
if you just nest
one inside another.
00:09:55.676 --> 00:09:57.206 A:middle
So something must've
been done in order
00:09:57.206 --> 00:09:58.616 A:middle
to make this behavior happen.
00:09:59.346 --> 00:10:01.046 A:middle
So let's look at how
we would do that.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:09:59.346 --> 00:10:01.046 A:middle
So let's look at how
we would do that.
00:10:02.236 --> 00:10:04.606 A:middle
Well, where might we want to
implement this kind of thing?
00:10:05.526 --> 00:10:08.016 A:middle
If you've watched previous
sessions and seen some
00:10:08.016 --> 00:10:10.496 A:middle
of the techniques we've used for
implementing custom interactions
00:10:10.496 --> 00:10:12.776 A:middle
in ScrollViews, you
probably already have an idea
00:10:12.776 --> 00:10:15.376 A:middle
of what I'm going to say.
00:10:15.596 --> 00:10:18.016 A:middle
And that, of course, is that
there's the delegate method,
00:10:18.016 --> 00:10:21.116 A:middle
scrollViewDidScroll,
which allows us to find