1
00:00:00,810 --> 00:00:07,230
Come back again in this lesson we're going to talk about s.a.a transactions when you see a transactions

2
00:00:07,260 --> 00:00:12,260
essentially to make different animations of the year happen simultaneously.

3
00:00:12,420 --> 00:00:19,120
It is a way of making all the CA I Nations atomic So they happen at the same time at the same thread.

4
00:00:19,260 --> 00:00:24,500
You could also add the UI view animations into the CIA turns action animation.

5
00:00:24,570 --> 00:00:28,040
So it is a system for combining different animations.

6
00:00:28,050 --> 00:00:33,030
It is often used for when you have a more complex set of animations happening.

7
00:00:33,030 --> 00:00:41,130
So I'm going to go to school and starting your project I'm going to call this project C A transactions

8
00:00:41,700 --> 00:00:43,470
and you might see a transaction.

9
00:00:43,500 --> 00:00:49,920
I'm going to have to go to the a storyboard and add the one object for animating essentially that object

10
00:00:49,920 --> 00:00:51,900
is going to be you I view.

11
00:00:51,960 --> 00:00:57,630
I'm not going to change anything other than making it my on a more distinct color then I'm going to

12
00:00:57,630 --> 00:01:01,410
go to my assistant window and I'm going to add an outlet for it.

13
00:01:01,460 --> 00:01:04,070
I'm going to call that outlet to read the box.

14
00:01:04,080 --> 00:01:06,550
That's all I'm going to do in this story.

15
00:01:06,640 --> 00:01:12,360
Now let's go ahead to our viewer controllers 55 and in here I don't need to use that lot.

16
00:01:12,390 --> 00:01:17,630
What they need is some sort of mechanism for running the animation and we usually use.

17
00:01:17,640 --> 00:01:20,020
But then this time I want to use that touches.

18
00:01:20,020 --> 00:01:24,500
And so every time the touch ends I want to run the animation.

19
00:01:24,600 --> 00:01:29,500
So let's see what all those animations that I went on over on three animations.

20
00:01:29,620 --> 00:01:32,580
I want to change the center of the object B.

21
00:01:32,610 --> 00:01:37,940
I want to change the shadow color and see I want to change the corner radius.

22
00:01:38,070 --> 00:01:44,150
So I want to change these three animations as we go through everything every cycle of the animation

23
00:01:44,160 --> 00:01:48,110
essentially every time the touch ends we have to change these three.

24
00:01:48,120 --> 00:01:54,210
So let's go ahead and get started with not before I can do these things particularly for the shadow

25
00:01:54,210 --> 00:01:54,580
color.

26
00:01:54,600 --> 00:01:59,910
I have to actually set up some things and the most important one of them is the shadow offset.

27
00:01:59,940 --> 00:02:04,480
We should know where the shadow is going to be generated so to do that.

28
00:02:04,500 --> 00:02:12,690
I'm going to go ahead and say that box dot layer dot shadow of said I'm going to put that as a CGI size

29
00:02:13,650 --> 00:02:14,720
and the CGI size.

30
00:02:14,730 --> 00:02:20,750
I'm going to put it to the left onto the bottom so minus 10 and maybe 20.

31
00:02:20,760 --> 00:02:29,220
So to the left and to the bottom and that I'm going to say Red Box dark or dark shadow opacity and I'm

32
00:02:29,220 --> 00:02:31,810
going to set that at maybe point 7 5.

33
00:02:31,830 --> 00:02:34,630
So this is kind of my initial settings.

34
00:02:34,650 --> 00:02:40,320
Now let's go ahead and get this started with actually animating using the see a transaction and the

35
00:02:40,320 --> 00:02:47,880
way you see a transaction works is very similar to a basic view animation USACA transaction door to

36
00:02:47,880 --> 00:02:48,970
begin.

37
00:02:49,350 --> 00:02:54,270
And then you do a lot of things and then you say see a transaction that come out.

38
00:02:54,600 --> 00:02:57,260
So that's essentially the block that you're right.

39
00:02:57,280 --> 00:03:03,000
You start with that begin and then you do a comment and then between the two of them you decide about

40
00:03:03,000 --> 00:03:04,770
the animations that you want to see.

41
00:03:04,770 --> 00:03:09,970
So before I go ahead and do that let's do some settings for R-CA transaction.

42
00:03:09,980 --> 00:03:15,250
I was going to say s.a.a transaction that said animation you ration.

43
00:03:15,270 --> 00:03:22,380
Which is this one I they give it to seconds for instance and then I'm going to have to change my animation

44
00:03:22,680 --> 00:03:25,400
timing function even though you don't have to.

45
00:03:25,410 --> 00:03:28,310
But you know it's kind of optional thing that is useful to do it.

46
00:03:28,310 --> 00:03:32,600
So that's going to be called animation timing function.

47
00:03:32,860 --> 00:03:39,990
And if you're expecting me to give it a see a media timing function which I'm going to say it is based

48
00:03:39,990 --> 00:03:48,330
on one that is named let's say linear or ease in or ease in and ease out.

49
00:03:48,330 --> 00:03:53,970
So it's essentially the same thing as we have gone through before how you run your animation how you

50
00:03:53,970 --> 00:03:56,780
ease in and out of different keyframes.

51
00:03:56,790 --> 00:04:03,360
So once I have that that we get myself a little bit of a space so I have my s.a.a transaction it's basic

52
00:04:03,370 --> 00:04:09,840
settings are ready it is ready to essentially come it or to launch and now have to give it the animations

53
00:04:09,840 --> 00:04:13,970
that they want to see the first bit of animation is a view animation.

54
00:04:13,980 --> 00:04:19,180
When I change the center so that's going to be a you if you animate.

55
00:04:19,370 --> 00:04:24,250
And I'm going to use the animation that doesn't have a completion because I don't care about that let's

56
00:04:24,360 --> 00:04:36,590
say into science let's do this animation self self dot the red box data center becomes self view dot

57
00:04:36,630 --> 00:04:37,390
center.

58
00:04:37,680 --> 00:04:41,590
So simply it goes and sits in a middle of the screen.

59
00:04:41,610 --> 00:04:43,360
And that's really really simple.

60
00:04:43,650 --> 00:04:47,450
Now let's go ahead and add two other animations for our lawyer.

61
00:04:47,460 --> 00:04:49,390
One of them for the shadow color.

62
00:04:49,530 --> 00:04:51,670
One of them for the corner radius.

63
00:04:51,810 --> 00:04:53,820
So both of them are going to be rather simple.

64
00:04:53,820 --> 00:05:02,310
I'm going to say let's corner on him and that's going to be a basic animation that's the basic animation

65
00:05:02,340 --> 00:05:04,300
I usually have to get the cheap shot.

66
00:05:04,350 --> 00:05:08,970
This time I'm not going to give it they keep either you will see you soon.

67
00:05:08,970 --> 00:05:10,990
And I'm going to say quarter animation.

68
00:05:11,010 --> 00:05:13,180
Of course you have to have it from you.

69
00:05:13,440 --> 00:05:14,940
So it is a core animation.

70
00:05:14,940 --> 00:05:16,310
Currently it is zero.

71
00:05:16,640 --> 00:05:22,650
And I need the corner animation to value which again I have to give it to let's give with a really large

72
00:05:22,650 --> 00:05:29,320
number maybe 50 so we can see it very clearly and then I'm going to see once this animation ended.

73
00:05:29,370 --> 00:05:36,960
I want to have my red box dot dot corner radius to stay at 50.

74
00:05:36,960 --> 00:05:39,880
Otherwise it would just jump back to being zero.

75
00:05:40,050 --> 00:05:48,530
So I'm going to set that to be back to 50 and then I'm going to have to say Redbox dot dot dot.

76
00:05:48,820 --> 00:05:52,760
I'm going to add the corner animation to it for the keypad.

77
00:05:52,770 --> 00:06:00,720
And here's what I'm going to use the keypad on the keypad is going to be your the corner radius.

78
00:06:00,750 --> 00:06:05,820
So this animation is now properly added to my red box.

79
00:06:05,820 --> 00:06:09,930
Let's go ahead and I'm actually going to copy everything in here because I know he's going to be an

80
00:06:09,930 --> 00:06:19,380
exactly similar thing except that this time it's called shadow shadow color on him and the shadow on

81
00:06:19,380 --> 00:06:21,630
him and the keypad to it right.

82
00:06:21,640 --> 00:06:24,350
Have the same keypad is it.

83
00:06:24,690 --> 00:06:28,840
See a dark shadow color.

84
00:06:29,100 --> 00:06:32,300
And then I'm going to see shadow color on him.

85
00:06:32,430 --> 00:06:42,530
It's from body you is you white color dot black dot C.G. color its truth value is you white color dot

86
00:06:42,600 --> 00:06:46,120
green perhaps dot C.G. color.

87
00:06:46,440 --> 00:06:54,240
And at the end we have to say layer dark shadow color becomes green as well.

88
00:06:54,250 --> 00:07:00,640
So I'm going to copy paste it there and then I'm going to say Red Box layer that shadow color animation.

89
00:07:00,930 --> 00:07:05,360
And if you don't need a key part this time because we already have added up here.

90
00:07:05,730 --> 00:07:11,280
So two different ways of adding animation depending on the keypad and obviously different from values

91
00:07:11,280 --> 00:07:12,320
and two values.

92
00:07:12,510 --> 00:07:19,050
And you have to keep in mind that the from and to is there kind of I don't know what kind of what type

93
00:07:19,050 --> 00:07:20,740
of valuable you have to fit them.

94
00:07:20,910 --> 00:07:24,180
So it's kind of unsafe but you have to be very careful with it.

95
00:07:24,480 --> 00:07:28,840
And now we have a C-8 transaction animation with two values.

96
00:07:29,010 --> 00:07:36,330
And if it all works when we go to our simulator every time that we head touches and we should see these

97
00:07:36,330 --> 00:07:39,040
three animations happening at the same time.

98
00:07:39,300 --> 00:07:47,750
Let's see if that's the case type and it's happening again it's happening of course you view animation

99
00:07:47,760 --> 00:07:53,610
center is already there so that that's not really changing but everything else is beginning from those

100
00:07:53,610 --> 00:07:56,380
values and ending at the same time.

101
00:07:56,640 --> 00:08:04,290
And that is C.A. turns action a way to combine different primarily see Aliah animations but you could

102
00:08:04,320 --> 00:08:07,470
also view animations in them as well.

103
00:08:07,710 --> 00:08:11,290
Let's keep it up to here and let's move on to our next lesson.
