1
00:00:08,120 --> 00:00:08,840
You welcome back.

2
00:00:08,840 --> 00:00:12,950
Ladies and gentlemen Johnny be here with slopes dot com and we've got some exciting stuff that we are

3
00:00:12,950 --> 00:00:21,320
going to get into in this lesson we are going to you know change our channel controller based on whether

4
00:00:21,320 --> 00:00:23,240
or not we are logged in.

5
00:00:23,240 --> 00:00:29,990
So right now we can you know create an account and in the last lesson we created that notification that

6
00:00:29,990 --> 00:00:34,040
is kind of like a radio signal being broadcast saying hey we changed something.

7
00:00:34,220 --> 00:00:38,330
So how do we react to that notification.

8
00:00:38,570 --> 00:00:44,380
Well what we got to do is add an observer that listens for that specific notification.

9
00:00:44,480 --> 00:00:44,910
OK.

10
00:00:45,170 --> 00:00:50,890
So here in channel ABC where we're going to start we're going to add an observer here in view to load.

11
00:00:50,930 --> 00:00:58,220
So to do that like I do say notification center dot default dot and observer this is the one we want

12
00:00:58,220 --> 00:00:59,200
right here.

13
00:00:59,390 --> 00:01:03,340
So the observer that we are adding is self.

14
00:01:04,220 --> 00:01:09,260
All right so the function that we are going to set here in the selector will create right here so we're

15
00:01:09,260 --> 00:01:19,940
going to say phunk user data did change and we are going to be accepting a notification using and saying

16
00:01:19,940 --> 00:01:24,930
no tiff and notification that we go.

17
00:01:25,550 --> 00:01:33,310
And remember we also need to have that objective see here in front to expose it to the Objective-C.

18
00:01:34,180 --> 00:01:35,920
And so what we're going to do here.

19
00:01:36,020 --> 00:01:42,920
Well first let's out of here in the slightest thing to say hash tag selector and we're going to say

20
00:01:42,980 --> 00:01:51,470
channel VCT dot and it's user data to change and we go the name of the notification.

21
00:01:51,470 --> 00:01:57,410
So this is how we you know tell it exactly which notification broadband listened to.

22
00:01:57,470 --> 00:01:57,860
OK.

23
00:01:57,860 --> 00:01:59,160
And so that is no.

24
00:01:59,240 --> 00:02:05,870
We put in the name of the notification that we created and the object is no.

25
00:02:06,280 --> 00:02:06,530
OK.

26
00:02:06,560 --> 00:02:10,600
So now what we've done is we added this observer.

27
00:02:10,670 --> 00:02:16,790
So when ever this noted that notification is posted for instance right now we only have it in the create

28
00:02:16,790 --> 00:02:21,100
account VCs when we create an account that notification is broadcast.

29
00:02:21,260 --> 00:02:26,670
And here in this channel beside us with file we are listening for that notification.

30
00:02:26,690 --> 00:02:31,730
And so whenever it's posted whenever it's broadcast we listen we hear it.

31
00:02:31,880 --> 00:02:37,710
And based on when we hear it we then call this function here use or data to change.

32
00:02:37,730 --> 00:02:42,860
So this function here is going to be called every time we receive that notification.

33
00:02:42,860 --> 00:02:43,080
All right.

34
00:02:43,130 --> 00:02:44,770
So what do we want to do.

35
00:02:45,010 --> 00:02:48,200
Well we want to update our you right here.

36
00:02:48,200 --> 00:02:53,240
All right so right now all we have is this profile image and the word right here.

37
00:02:53,240 --> 00:02:59,210
So when we're logged in this is going to have the users image and the users name who are logged out

38
00:02:59,270 --> 00:03:00,830
is going to be just like this.

39
00:03:00,830 --> 00:03:02,190
So let's go ahead and do that.

40
00:03:02,270 --> 00:03:09,110
And this is where we can get to use the is logged in Boullion So if if off service stot instance that

41
00:03:09,200 --> 00:03:11,840
is logged in.

42
00:03:11,870 --> 00:03:16,120
So if we are logged in we're going to change the name of the buttons and we do that by saying logon

43
00:03:16,150 --> 00:03:25,520
button dot the set title game and the title that we are going to set is we're going to string inter-relate

44
00:03:26,220 --> 00:03:33,350
I guess we don't need to string in her plate we can just say user data service that instance that name

45
00:03:33,500 --> 00:03:34,930
because that's already a string.

46
00:03:35,240 --> 00:03:40,010
And then we have to specify the state we're going to say Dot normal's let's say that normal or default

47
00:03:40,010 --> 00:03:43,630
state of the Baun can looks good.

48
00:03:43,620 --> 00:03:50,410
Next up we're going to change the user image and say user image.

49
00:03:50,540 --> 00:03:53,630
You know what I don't think we we don't have an outlet for that.

50
00:03:53,660 --> 00:03:56,420
So I'm going to hold option and click on the main storyboard

51
00:04:00,590 --> 00:04:12,410
and just scroll on over to here with the channel Visi and grab that and the image and go control drag

52
00:04:12,770 --> 00:04:13,740
over here.

53
00:04:13,760 --> 00:04:16,090
And I'm a user image.

54
00:04:16,490 --> 00:04:19,460
OK so that's an outlet for that image there.

55
00:04:19,570 --> 00:04:30,380
Then to go back to Standard editor full screen and I'm going to say user image that image is equal to

56
00:04:30,380 --> 00:04:34,440
you I image name.

57
00:04:34,940 --> 00:04:40,940
And the name is user data service.

58
00:04:41,150 --> 00:04:45,680
Instance that avatar name can.

59
00:04:46,320 --> 00:04:53,480
And then if we're not logged in if for instance this would be this notification would also be called

60
00:04:53,970 --> 00:04:55,360
when we log out.

61
00:04:55,410 --> 00:05:05,360
And so in that case we're going to say logon button set title and the title is going to be we're going

62
00:05:05,360 --> 00:05:08,130
to set it back to log in for control state.

63
00:05:08,130 --> 00:05:12,150
Again not normal.

64
00:05:12,220 --> 00:05:14,740
Now we're going to set the image back to the default.

65
00:05:14,750 --> 00:05:20,610
I'm going to say user image that image is equal to UI image

66
00:05:23,130 --> 00:05:35,810
named and the name of our default is menu profile icon and then we'll set the background color to Clear's

67
00:05:35,980 --> 00:05:48,420
so user image dot background color is equal to your eye color that clear that see color.

68
00:05:49,220 --> 00:05:53,870
All right I'm going to save that and let's run this and check it out.

69
00:05:54,060 --> 00:05:56,670
Looks like we don't need the C-g color here.

70
00:05:56,730 --> 00:05:58,110
Just you I colored clear.

71
00:05:58,110 --> 00:05:59,670
There we go.

72
00:05:59,670 --> 00:06:02,400
I'm going to create a new user.

73
00:06:02,850 --> 00:06:11,680
And if all goes according to plan once it's created then we should see the name and the user's avatar.

74
00:06:11,700 --> 00:06:11,920
Right.

75
00:06:11,920 --> 00:06:16,500
There's some sage honey at Shawnee at www dot com.

76
00:06:16,740 --> 00:06:19,260
Password 1 2 3 4 5 6.

77
00:06:19,410 --> 00:06:21,230
Choose an avatar.

78
00:06:21,240 --> 00:06:31,650
Let's go with this Falcon here to generate a background color and see here that looks kind of cool.

79
00:06:31,740 --> 00:06:32,850
I say create account.

80
00:06:32,940 --> 00:06:35,960
We get our spinner up and once it's done.

81
00:06:36,000 --> 00:06:37,320
Hey there we go.

82
00:06:37,320 --> 00:06:49,590
So now we are displaying the user's name and our user avatar image but you see here that we don't have

83
00:06:49,590 --> 00:06:52,950
the background color that the user selected.

84
00:06:53,040 --> 00:06:57,440
So that also reminds me that we need to fix one thing here and create a count.

85
00:06:57,470 --> 00:07:04,140
The sea you see right here that when we create and generate our background color word we forgot to set

86
00:07:05,190 --> 00:07:09,270
this avatar color to this new one that we generate.

87
00:07:09,270 --> 00:07:09,720
OK.

88
00:07:09,900 --> 00:07:17,460
So what we're going to do is back here and create a count b c we're going to see Avatar color is equal

89
00:07:17,460 --> 00:07:18,310
to.

90
00:07:18,580 --> 00:07:19,940
There's going to be a string.

91
00:07:20,030 --> 00:07:30,930
We're going to have some square brackets and we need to string and interpolate the R value the G value

92
00:07:32,280 --> 00:07:37,310
the B value and then just one.

93
00:07:37,550 --> 00:07:38,210
OK.

94
00:07:38,480 --> 00:07:44,750
And so make sure that you're double checking how this looks it's got to be just like this with the it's

95
00:07:44,750 --> 00:07:49,710
got to be a string with the square brackets and then the.

96
00:07:49,750 --> 00:07:50,980
And then the comments OK.

97
00:07:51,480 --> 00:07:55,450
So that's how that's how we got to save that.

98
00:07:55,470 --> 00:07:59,480
So I'm going to save it and run it here.

99
00:07:59,820 --> 00:08:02,770
Log in and have an account.

100
00:08:03,130 --> 00:08:12,540
So I'm going to say Chuny color humo Chauny at color dot com.

101
00:08:12,740 --> 00:08:15,630
Password one two three four five six.

102
00:08:15,670 --> 00:08:18,150
Choose an avatar elephant.

103
00:08:18,210 --> 00:08:19,210
Fine.

104
00:08:19,320 --> 00:08:24,030
And I'm going to create the account.

105
00:08:24,050 --> 00:08:28,190
All right so again we get the avatar image here and the color.

106
00:08:28,410 --> 00:08:36,530
But what I wanted to show you with this was if we open up my lab and I refresh our users then we should

107
00:08:36,530 --> 00:08:41,660
see here Johnny a colored dot com and we are saving to the database.

108
00:08:41,660 --> 00:08:46,040
This array of a string array of values.

109
00:08:46,040 --> 00:08:46,570
OK.

110
00:08:46,670 --> 00:08:54,620
So what we need to do is we need to be able to take this string and turn it into four components that

111
00:08:54,620 --> 00:08:57,820
we can use to then generate a new color.

112
00:08:57,830 --> 00:08:58,310
OK.

113
00:08:58,460 --> 00:08:59,660
So that's what we're going to do next.

114
00:08:59,660 --> 00:09:03,660
And it's a bit of a challenge but we'll we'll get through it.

115
00:09:04,040 --> 00:09:12,200
OK so the flow again is we are creating we create a user we generate our G-B values and we save that

116
00:09:12,200 --> 00:09:17,190
to the database in the form of that string array program.

117
00:09:17,240 --> 00:09:24,740
So once we have that string array and we pull that back down as part of our process we need to turn

118
00:09:24,740 --> 00:09:30,890
that string array into four actual variables that we can use to then generate a new color that we can

119
00:09:30,890 --> 00:09:33,880
use to set the background color of our images.

120
00:09:33,890 --> 00:09:34,460
OK.

121
00:09:34,670 --> 00:09:38,960
So that's actually going to we're going to do that here in user data service and I'm going to create

122
00:09:38,960 --> 00:09:46,340
a new function to do this because this bottom pain and give them space here and I'm going to call it

123
00:09:46,500 --> 00:09:53,720
phunk turn UI color because we're going to do is we're a pass into it.

124
00:09:53,810 --> 00:09:57,500
The components in that string format.

125
00:09:57,500 --> 00:10:10,010
And we're going to return a UI color and we're going to come back up here and copy a home just over

126
00:10:10,010 --> 00:10:11,400
here an M labs.

127
00:10:11,420 --> 00:10:20,340
I'm copying one of these color strings so we have it as reference and just can I comment that out.

128
00:10:20,960 --> 00:10:29,210
And so like I was saying we need to somehow extract from this string all of these each of these values

129
00:10:29,210 --> 00:10:31,120
into our G-B and.

130
00:10:31,240 --> 00:10:31,700
OK.

131
00:10:32,090 --> 00:10:36,330
So what we're going to do is we're going to introduce something called a scanner.

132
00:10:36,380 --> 00:10:37,020
All right.

133
00:10:37,340 --> 00:10:44,680
And so let's go ahead and create that scanner variable and a scanner equal scanner.

134
00:10:45,260 --> 00:10:49,840
And you go ahead and initialize it with a print to see.

135
00:10:49,850 --> 00:10:51,560
And we want this guy right here.

136
00:10:51,590 --> 00:10:52,650
String.

137
00:10:52,970 --> 00:10:53,190
All right.

138
00:10:53,190 --> 00:11:00,000
And so the string that we are going to scan is what we pass into this function which is his components.

139
00:11:00,080 --> 00:11:00,720
OK.

140
00:11:01,100 --> 00:11:04,450
So when we call this function we are going to pass into the scanner.

141
00:11:04,520 --> 00:11:06,550
This string right here.

142
00:11:06,800 --> 00:11:08,150
And what does a scanner do.

143
00:11:08,150 --> 00:11:13,850
Click here we can see that it says and then a scanner object interprets and converts the characters

144
00:11:13,850 --> 00:11:17,710
of an endless string object into number and string values.

145
00:11:17,810 --> 00:11:23,690
You assign the scanner's string creating it and the scanner progresses through the characters of that

146
00:11:23,690 --> 00:11:27,760
string from beginning to end as you request items.

147
00:11:28,040 --> 00:11:33,260
And so you know you see in those sci fi movies sometimes they got those flying like little scanner things

148
00:11:33,260 --> 00:11:33,950
in it.

149
00:11:34,110 --> 00:11:38,200
Shoot out some red beams and just scan something from top to bottom.

150
00:11:38,240 --> 00:11:40,360
That's what we're doing here with the scanner we are.

151
00:11:40,380 --> 00:11:45,560
We are passing in a string and we are just going to start from the beginning and scan through it and

152
00:11:45,560 --> 00:11:49,520
we can have specific rules and have it do certain things for us.

153
00:11:49,520 --> 00:11:50,210
OK.

154
00:11:50,720 --> 00:11:53,180
So let's go ahead and get started.

155
00:11:53,210 --> 00:11:59,090
The first thing that we want to tell it to do is tell it which characters to skip because if we start

156
00:11:59,090 --> 00:12:03,750
here at the beginning you'll see that we have a square bracket.

157
00:12:04,070 --> 00:12:10,070
Over here we have a comma we have some spaces and we don't care about those we only want the numerical

158
00:12:10,160 --> 00:12:12,200
values that we want to end up with.

159
00:12:12,200 --> 00:12:19,010
So we're going to say let skipped school and we're going to create a character set

160
00:12:24,250 --> 00:12:28,630
we want characters in string right here characters in string.

161
00:12:29,110 --> 00:12:36,550
So we're just going to make a string and inside of the string we're going to put a square brackets comma

162
00:12:36,640 --> 00:12:38,370
and a space.

163
00:12:38,370 --> 00:12:43,180
All right so those are the four characters that we wanted to skip and not care about.

164
00:12:43,640 --> 00:12:44,920
All right the next one we're going to need.

165
00:12:44,950 --> 00:12:47,800
We're going to need a variable called comma.

166
00:12:48,670 --> 00:12:49,810
And so will we.

167
00:12:49,800 --> 00:12:52,810
Because what we're going to do is we're going to be able to say the method that we're going to use is

168
00:12:52,810 --> 00:12:58,000
you were going to say start at the beginning and scan up to a specific character.

169
00:12:58,000 --> 00:13:03,880
All right so that specific character we want to stop at is the comma because a comma is the one thing

170
00:13:03,880 --> 00:13:08,420
that is common between each of these that divides it up right.

171
00:13:08,710 --> 00:13:08,930
OK.

172
00:13:08,950 --> 00:13:12,830
So come on that's going to be equal to the same thing.

173
00:13:12,970 --> 00:13:17,110
Characters set characters in.

174
00:13:17,170 --> 00:13:21,360
But instead of all of them what we are doing is just a comma.

175
00:13:21,790 --> 00:13:28,110
Then we have to actually set the characters to be skipped something to say scanner dot hopes not that

176
00:13:28,120 --> 00:13:40,670
one scanner our variable scanner dot characters to be skipped and set that equal to skip but let's.

177
00:13:40,750 --> 00:13:49,680
OK so now we are ready to kind of actually start scanning this so we're going to need a few variables

178
00:13:49,680 --> 00:13:54,360
that we can save our G-B and a values into.

179
00:13:54,360 --> 00:13:59,750
So I'm going to say R R G B and A.

180
00:14:00,150 --> 00:14:03,660
And so there's just a way to create multiple variables on the same line.

181
00:14:03,690 --> 00:14:09,850
As long as they are the same type and these are going to be of type optional and as a string.

182
00:14:10,180 --> 00:14:10,790
OK.

183
00:14:11,200 --> 00:14:18,120
And it's optional and a string simply because that is what the method that we are needing is going to

184
00:14:18,120 --> 00:14:20,130
be required.

185
00:14:20,130 --> 00:14:20,890
All right.

186
00:14:21,480 --> 00:14:26,700
And that's giving us an error because it wants a turn of a color so just get rid of that error when

187
00:14:26,760 --> 00:14:31,020
I say return you I color that red.

188
00:14:31,130 --> 00:14:34,070
OK we'll fix that later.

189
00:14:35,100 --> 00:14:38,300
OK so now we can actually start scanning.

190
00:14:38,400 --> 00:14:46,350
So we're going to do is we're in a state scanner dot scan up to you and we want this one right here

191
00:14:46,350 --> 00:14:55,260
we want scan up to characters M K and we're at the the character that we're going to scan up to is our

192
00:14:55,270 --> 00:15:05,600
comma and the way we're going to scan it into is our variables that we just created here r g.

193
00:15:05,940 --> 00:15:13,890
But to make it work we've got to do ampersand R and that's just the way of saying for this function

194
00:15:13,890 --> 00:15:21,390
which uses auto releasing unsafe mutable pointers and we have to have this ampersand to get it to go

195
00:15:21,900 --> 00:15:24,490
correctly into our variables that we just created.

196
00:15:24,810 --> 00:15:30,480
OK so all we're saying is we're saying scanner go ahead and scan up to the character comma starting

197
00:15:30,480 --> 00:15:31,420
at the beginning.

198
00:15:31,710 --> 00:15:33,600
So we're going to start here and we're going to.

199
00:15:33,610 --> 00:15:38,450
We told them to skip the brackets and the spaces was going to skip.

200
00:15:38,450 --> 00:15:41,280
This guy here is going to say OK here I mean.

201
00:15:41,320 --> 00:15:47,640
I'm scanning and scanning up here's a comma so I'm going to stop and then I'm going to save this variable

202
00:15:47,730 --> 00:15:50,040
into our right here.

203
00:15:50,260 --> 00:15:50,780
OK.

204
00:15:51,030 --> 00:15:54,330
So we scanned up to the comma and ignored.

205
00:15:54,450 --> 00:16:02,070
We know what to ignore and then we saved the rest into our So we can do that for the rest of them.

206
00:16:02,110 --> 00:16:08,640
Copy this and pasted a few more times because one the next line it continues where it left off.

207
00:16:08,640 --> 00:16:10,230
So then it stops right here.

208
00:16:10,230 --> 00:16:15,930
It starts right here and it ignores the space and then it scans this variable and then it stops at the

209
00:16:15,930 --> 00:16:20,400
next comma and it's going to save that into the G variable.

210
00:16:20,790 --> 00:16:27,510
And then so on and so forth continuing from here it grabs this one and saves that into the B variable

211
00:16:27,840 --> 00:16:31,380
and lastly into the a variable.

212
00:16:31,440 --> 00:16:37,520
Ok so now we have string variables saved inside of these but they're optional.

213
00:16:37,530 --> 00:16:40,430
So we need to unwrap them.

214
00:16:40,500 --> 00:16:48,510
However if the if the unwraps fails we need to still be able to return a white color because this function

215
00:16:48,510 --> 00:16:50,840
requires that we returned a color.

216
00:16:50,880 --> 00:16:52,930
So we're going to have a default colors.

217
00:16:53,000 --> 00:16:55,560
So when I say let the default

218
00:16:58,170 --> 00:17:05,880
default color call and I'm just going to say let UI color dot light gray that's just going to be our

219
00:17:05,880 --> 00:17:07,890
default color in case we fail.

220
00:17:08,220 --> 00:17:13,460
So now we're going to do some guard statements to unwrap each of these variables here.

221
00:17:13,470 --> 00:17:13,870
OK.

222
00:17:14,020 --> 00:17:28,040
So I want to say Guard that are on Wrapped is equal to or else return the default color.

223
00:17:28,740 --> 00:17:33,150
We're just going to do that for all four of those variables.

224
00:17:33,660 --> 00:17:35,840
Paste paste paste.

225
00:17:36,020 --> 00:17:42,230
This is going to be lit G unwrapped and be unwrapped and unwrapped.

226
00:17:42,430 --> 00:17:44,020
And this is going to be G.

227
00:17:44,400 --> 00:17:45,070
B.

228
00:17:45,170 --> 00:17:52,370
And so if any of those rappings fail it's just going to return our default color.

229
00:17:52,950 --> 00:18:02,490
OK so now we have an unwrapped string for each of these variables but we need to them to be in the form

230
00:18:02,490 --> 00:18:07,760
of C.G. floats because the initializer for a color requires them to be in C you float.

231
00:18:07,770 --> 00:18:11,090
So now we got to convert these strings into C.G. floats.

232
00:18:11,460 --> 00:18:18,090
But as far as I know there's not a direct conversion between strings to CEG floats.

233
00:18:18,090 --> 00:18:23,310
There is a conversion from string to double value and then from there we can do a conversion from a

234
00:18:23,310 --> 00:18:25,060
double value to a C.G. float.

235
00:18:25,230 --> 00:18:30,210
So that is what I am afraid we are going to have to do something when I say let our float is equal to

236
00:18:30,210 --> 00:18:40,540
c float and then inside of there we are going to say r n wrapped dot value game.

237
00:18:40,690 --> 00:18:47,050
So we're converting these unwrapped strings to a double and converting that into a C.G. float.

238
00:18:47,280 --> 00:18:53,710
All right I'm going to copy that and paste that a few times as well.

239
00:18:54,190 --> 00:19:01,940
And so this is going to be the float float and a float.

240
00:19:02,000 --> 00:19:02,470
This is

241
00:19:05,090 --> 00:19:10,040
unwrapped B unwrapped and unwrapped.

242
00:19:10,600 --> 00:19:11,080
OK.

243
00:19:11,280 --> 00:19:20,100
So now we finally have our C.G. foot values for R.G. B and A that we can use to finally create our New

244
00:19:20,420 --> 00:19:22,650
You eye color.

245
00:19:25,060 --> 00:19:40,410
So initializers and we need for this guy right here so read is our float green is g float blue is B

246
00:19:40,410 --> 00:19:40,950
float

247
00:19:43,530 --> 00:19:48,930
b is or blue is B float and it is a float.

248
00:19:49,860 --> 00:19:57,140
And then we are going to return this new UI color.

249
00:19:57,240 --> 00:20:07,080
So a little bit complicated just to turn this string of values into actual values but I'm going to delete

250
00:20:07,080 --> 00:20:07,730
this

251
00:20:10,930 --> 00:20:12,280
and run through it one more time.

252
00:20:12,280 --> 00:20:20,300
We created a scanner set the script and up two variables and then we actually just scan through saved

253
00:20:20,510 --> 00:20:23,280
those into some variables of string.

254
00:20:23,300 --> 00:20:29,530
Then we had to unwrap them and then convert those to C.G. float values so that we could create our final

255
00:20:30,100 --> 00:20:32,140
color and return it.

256
00:20:32,140 --> 00:20:35,860
I just want to say that and let's actually use this function now.

257
00:20:36,130 --> 00:20:44,380
So back here in our log in not log NBC channel ABC if we are logged in when we set the user image.

258
00:20:44,470 --> 00:20:50,170
Now we can set the background image of the background color as well using that punching that we just

259
00:20:50,170 --> 00:20:50,600
created.

260
00:20:50,650 --> 00:20:53,310
Going to say user image.

261
00:20:54,250 --> 00:21:04,380
Dot background color is equal to and we're going to call user data service datt instance that return

262
00:21:05,140 --> 00:21:05,950
color.

263
00:21:06,150 --> 00:21:16,500
And what we pass into it is the user data service for instance that have a tar color just when to save

264
00:21:16,500 --> 00:21:18,830
that and run it.

265
00:21:19,080 --> 00:21:20,250
And fingers crossed.

266
00:21:20,310 --> 00:21:28,290
Once we log in and we dismiss it back to the channel B C we should see not only the users name over

267
00:21:28,290 --> 00:21:36,440
the logging button but we should also see our avatar image with the Avatar background color my cooking

268
00:21:36,440 --> 00:21:41,930
or cook log in say oh we need to create the account.

269
00:21:42,220 --> 00:21:56,240
So when I say coloring and color at back ground and the password is 1 2 3 4 5 6 it create an avatar

270
00:21:56,690 --> 00:21:57,980
and go to Gorilla.

271
00:21:57,980 --> 00:22:02,990
This time and pick this color here is going to create a count.

272
00:22:03,900 --> 00:22:07,050
And let's see hey there we go.

273
00:22:07,050 --> 00:22:14,520
All right so now we have a way of converting our color that we generate and save to our database to

274
00:22:14,520 --> 00:22:17,360
an actual color once we get it back from the database.

275
00:22:17,370 --> 00:22:25,690
And so we're going to use this every time we open up our profile page if you were let's see here I can

276
00:22:26,130 --> 00:22:33,570
hold up our markups so we're going to call it here we call it on every single message.

277
00:22:33,640 --> 00:22:38,110
And so this was an important function to for us to create right now.

278
00:22:38,370 --> 00:22:42,180
And I think it's a useful tool to also know how to use that scanner.

279
00:22:42,180 --> 00:22:42,700
All right.

280
00:22:42,870 --> 00:22:49,350
So in this lesson we learn how to use notifications how to observe the notifications and we also learn

281
00:22:49,350 --> 00:22:53,420
how to use the scanner which is a powerful tool for working with street.

282
00:22:53,430 --> 00:22:54,070
All right.

283
00:22:54,330 --> 00:23:00,390
So just to finish off I'm going to go ahead and commit our changes and then I will see you all in the

284
00:23:00,390 --> 00:23:01,090
next one.
