1
00:00:02,830 --> 00:00:07,930
This Alison is going to be very simple in fact we're going to reach out to a lot of things that we have

2
00:00:07,930 --> 00:00:11,700
done and we're going to bring them into an all US project.

3
00:00:11,740 --> 00:00:17,290
So far we have been doing command line tools but now I'm going to bring some of these variables in on

4
00:00:17,380 --> 00:00:20,630
our website and show you how to work there.

5
00:00:20,630 --> 00:00:25,300
This would also be a good reminder for us of some of the things we learned in Iowa.

6
00:00:25,340 --> 00:00:27,450
Some we haven't touched them in a while.

7
00:00:27,760 --> 00:00:30,640
So let's jump back into school.

8
00:00:30,890 --> 00:00:37,930
I'm going to say close this project give me a new project and this new project obviously is going to

9
00:00:37,930 --> 00:00:42,210
be an eye or single view in our language.

10
00:00:42,240 --> 00:00:51,520
Make sure that you keep it as objective see all the other things as before is going to be very very

11
00:00:51,520 --> 00:00:54,790
close by ORUs.

12
00:00:55,230 --> 00:01:02,970
So now they have this project what I'm going to do is I'm going to go to my storyboard file which is

13
00:01:02,970 --> 00:01:05,330
here and this story will work fine.

14
00:01:05,340 --> 00:01:08,260
I'm going to have one text view.

15
00:01:08,550 --> 00:01:14,760
So I'm going here I don't find the text you want there I get over my project which is number down here

16
00:01:14,780 --> 00:01:18,700
your user ID and say this is my text.

17
00:01:20,100 --> 00:01:25,610
And then I'm going to use the assistant window as we've done many times before.

18
00:01:26,040 --> 00:01:27,430
If you don't remember how to.

19
00:01:27,430 --> 00:01:29,480
This is a good reminder for you.

20
00:01:29,670 --> 00:01:40,520
I'm going to go to that age I go over this and say This guy is actually called the main text view.

21
00:01:40,800 --> 00:01:42,790
So that is my main text.

22
00:01:42,820 --> 00:01:45,480
Well I want to see different things.

23
00:01:45,750 --> 00:01:53,820
So with that in mind this goes back to the main editor and move one to our AM NOW you know all of these

24
00:01:53,820 --> 00:01:58,760
are comments and you can kind of get rid of them some delete all of those.

25
00:01:59,370 --> 00:02:05,580
So I'm going to Warsaw reformats my view that lot and delete everything that is a comment.

26
00:02:05,600 --> 00:02:14,100
I mean here I can go ahead and say main text view dot text and that I have to assign it to someone or

27
00:02:14,100 --> 00:02:15,560
to some value.

28
00:02:15,750 --> 00:02:17,860
So let's go ahead and add those guys.

29
00:02:18,090 --> 00:02:21,530
I'm going to say integer.

30
00:02:22,130 --> 00:02:36,560
My let's call Khalid's are my building my building number is 200 integer.

31
00:02:36,690 --> 00:02:41,030
My float is not my fault.

32
00:02:41,040 --> 00:02:48,650
My floor is let's say 6 and then a string.

33
00:02:48,720 --> 00:02:52,620
My name is Amir.

34
00:02:53,220 --> 00:02:57,220
And then also I have a string.

35
00:02:57,630 --> 00:03:01,940
My city is Vancouver.

36
00:03:02,640 --> 00:03:06,140
And then let's add another piece of information.

37
00:03:06,150 --> 00:03:09,680
And that's going to be a float value.

38
00:03:09,690 --> 00:03:21,660
So let's say a float on my watch this stance is let's say six point five kilometers.

39
00:03:21,990 --> 00:03:30,060
So what I want to do is I want you to find a way I want you to think about of a of combining and concatenating

40
00:03:30,060 --> 00:03:35,760
all of these information inside one big string or in a mutable string.

41
00:03:35,760 --> 00:03:39,690
Better to show us all of those information in here.

42
00:03:39,690 --> 00:03:41,270
In the main text view.

43
00:03:41,490 --> 00:03:43,570
So let's get started with that.

44
00:03:43,590 --> 00:03:52,510
I'm going to go ahead and say and as mutable a string and then as this thing is going to be let's call

45
00:03:52,530 --> 00:04:00,570
it final string and that is going to be just like the last time and as mutable a string string string

46
00:04:00,780 --> 00:04:06,850
with a string on the string glistering actually says they're very difficult.

47
00:04:06,860 --> 00:04:08,440
What is this.

48
00:04:08,440 --> 00:04:10,320
Call it say use.

49
00:04:10,590 --> 00:04:11,350
All right.

50
00:04:11,410 --> 00:04:14,640
We're going to see at the very top of this text.

51
00:04:14,850 --> 00:04:17,400
So so far it just says user.

52
00:04:17,640 --> 00:04:22,610
And now I could actually go ahead and use it for my text.

53
00:04:23,130 --> 00:04:29,810
So I'm going to say main text you that text because finding out a string.

54
00:04:30,270 --> 00:04:35,100
What is important is everything that we do between these two.

55
00:04:35,310 --> 00:04:42,270
As you can imagine right now if I run this application we will see the text you showing user on the

56
00:04:42,270 --> 00:04:43,400
very top of it.

57
00:04:43,550 --> 00:04:45,530
Let's see that in action.

58
00:04:45,920 --> 00:04:48,900
Bill on my app.

59
00:04:48,900 --> 00:04:54,290
And once it loads in my simulator I should be able to see that user.

60
00:04:54,620 --> 00:05:03,000
All right so now I want to write a set of information here and I want to have them formatted one line

61
00:05:03,030 --> 00:05:06,880
each line in each line I want to have it really nice and tidy.

62
00:05:06,900 --> 00:05:08,760
I want them to be indented.

63
00:05:08,850 --> 00:05:11,870
So let's see how you can do without user.

64
00:05:11,940 --> 00:05:16,770
Then the next thing I want to have four finalists Thring is fine on a string.

65
00:05:16,770 --> 00:05:18,350
Append string.

66
00:05:18,480 --> 00:05:23,060
And when they want to append is this I want to go to three lines down.

67
00:05:23,260 --> 00:05:30,780
So in here and it's not really a choice that you should make or should make at this point.

68
00:05:30,840 --> 00:05:36,800
But if you want to you can constantly rerun your application so you can see what's happening.

69
00:05:36,810 --> 00:05:43,420
So right now you could rewrite it except that it's going to be three lines down and I won't see anything.

70
00:05:43,530 --> 00:05:46,800
So I could actually say finally string.

71
00:05:47,190 --> 00:05:48,940
Append a string.

72
00:05:49,110 --> 00:05:54,560
I'm going to have him provide you so I can see where I am currently.

73
00:05:54,600 --> 00:06:00,500
That's Rondout I use the shortcut for which is command.

74
00:06:00,540 --> 00:06:07,550
Or you could actually use that or you could just press that one so you can see user 1 2 3 9.

75
00:06:07,580 --> 00:06:09,260
And we are here at 10.

76
00:06:09,470 --> 00:06:12,810
But that's not the kind of thing I want to be I want to be at 10.

77
00:06:12,850 --> 00:06:15,010
I want to be indented to the right.

78
00:06:15,140 --> 00:06:19,590
So I'm going to say for the smashed sheet or if you want.

79
00:06:19,620 --> 00:06:23,530
You can even separate out we can't say final this thing.

80
00:06:23,540 --> 00:06:25,300
Append the string.

81
00:06:25,560 --> 00:06:37,910
And so it essentially says user line line line and tab that's read on again and now redraws it says

82
00:06:37,910 --> 00:06:40,640
use it and this is where we are right now.

83
00:06:40,790 --> 00:06:48,590
So in a sort of 10 I actually want to say finalist Thring I penned this thing and this thing is going

84
00:06:48,590 --> 00:06:56,460
to be user name for words and call them and that's what they want to hear.

85
00:06:56,570 --> 00:06:59,420
So there is a user name space.

86
00:06:59,480 --> 00:07:02,560
And then I want to say finally a string.

87
00:07:02,780 --> 00:07:05,650
Append the string and tweet.

88
00:07:05,720 --> 00:07:07,830
I want to add my name.

89
00:07:08,420 --> 00:07:10,450
So let's see what we have right now.

90
00:07:10,460 --> 00:07:18,920
We should have user name equals my name and then immediately tempy should show up because we haven't

91
00:07:18,920 --> 00:07:21,310
told them to go the next line.

92
00:07:21,470 --> 00:07:24,990
So I'm going to do that and I'm going to say find this thing.

93
00:07:24,990 --> 00:07:31,160
Append the string go one line down and that's very simple.

94
00:07:31,160 --> 00:07:32,710
So that's wrong that

95
00:07:37,040 --> 00:07:43,290
could use our name here and then goes the next line up something I wanted to mention that there is no

96
00:07:43,620 --> 00:07:46,650
particular reason to do it one way or another.

97
00:07:46,710 --> 00:07:53,070
I usually do all of my coding like this I leave a little space between the columns and there the text

98
00:07:53,070 --> 00:07:59,310
that comes to the right of it you can make your own format or if you want you can basically stick to

99
00:07:59,310 --> 00:08:04,960
the way that I'm doing until you get a better sense of you know how you want it to be done.

100
00:08:05,070 --> 00:08:11,140
Now that we know this thought is working I want the temp to be aligned with the user name as well.

101
00:08:11,310 --> 00:08:18,360
So I'm going to say as you go one line for a while also you go one line or you go for cocktails or a

102
00:08:18,360 --> 00:08:20,410
tablet for word as well.

103
00:08:20,730 --> 00:08:27,210
And then the rest of it becomes you know quite repetitive some can actually get copied as part

104
00:08:30,900 --> 00:08:38,500
I'm going to say then say levels in building

105
00:08:40,570 --> 00:08:47,170
number and then I have to have this guy my number.

106
00:08:47,170 --> 00:08:53,800
However remember that this building number is not a string it's an integer.

107
00:08:53,950 --> 00:08:57,390
So we have to kind of format that value.

108
00:08:57,580 --> 00:09:03,820
If you remember this was formatting and as a string string with format.

109
00:09:04,120 --> 00:09:11,790
The format is our I and my building number and now we have to see both of those.

110
00:09:12,040 --> 00:09:17,230
Let's see.

111
00:09:17,260 --> 00:09:18,910
So now we have a user name.

112
00:09:18,910 --> 00:09:21,540
I mean lives in building number blah blah.

113
00:09:21,760 --> 00:09:28,240
If this doesn't really make all this sense for you and this you know multiple brackets is confusing

114
00:09:28,240 --> 00:09:29,220
you Art.

115
00:09:29,230 --> 00:09:31,120
Let's change that a little bit.

116
00:09:31,120 --> 00:09:34,990
I'm going to say in here we have a string.

117
00:09:35,200 --> 00:09:46,240
I'm going to say for my third string of building you can name your valuables whichever way you like

118
00:09:46,240 --> 00:09:53,050
and you can make them really long but you can just say you know if you know what that is I usually tend

119
00:09:53,050 --> 00:09:59,320
to give them a you know a much longer name that kind of makes sense maybe not as long as this one.

120
00:09:59,410 --> 00:10:02,200
But there's certainly nothing wrong with doing this either.

121
00:10:02,340 --> 00:10:11,030
So I'm going to say for Martha this thing of building is this get it cut out place it here.

122
00:10:11,280 --> 00:10:13,340
So this is the formatted version.

123
00:10:13,470 --> 00:10:20,610
Let me change just a little bit so let's call it building a string.

124
00:10:20,970 --> 00:10:26,410
Building a string is the formatted version of this text.

125
00:10:26,730 --> 00:10:28,950
I could get myself a little bit of space.

126
00:10:28,950 --> 00:10:29,620
Perfect.

127
00:10:29,620 --> 00:10:37,200
So so far I have the lives in building and then I've got that extreme value of my number which used

128
00:10:37,200 --> 00:10:46,790
to be an integer and now I'm going to get my final listing to append this value to its So be converted

129
00:10:46,790 --> 00:10:51,490
into a string and be connected or appended to a string.

130
00:10:51,740 --> 00:10:54,360
That's right again and nothing should have changed.

131
00:10:54,360 --> 00:10:56,750
It should work exactly the way you expected it.

132
00:10:57,850 --> 00:10:58,470
Perfect.

133
00:10:58,510 --> 00:11:05,590
Now because they got their lives in building number but I had this only one more time with the flow

134
00:11:05,710 --> 00:11:06,530
of ideas.

135
00:11:06,760 --> 00:11:16,330
So in here I have to remember to leave this part which is essentially giving it another line of other

136
00:11:16,330 --> 00:11:17,090
tab.

137
00:11:17,130 --> 00:11:31,830
So I'm going to copy that in here war weeks between now and works within what the distance works within.

138
00:11:31,860 --> 00:11:41,940
I know I have to convert my designs into a string so I'm going to say this thing the science a string

139
00:11:42,390 --> 00:11:49,860
is a string a string with format float value of my work stands.

140
00:11:50,010 --> 00:11:58,860
So it takes my work this converted based on a float into a new format of a string and puts it in something

141
00:11:58,860 --> 00:12:00,750
called distance testing.

142
00:12:00,960 --> 00:12:06,060
And now I'm going to say find this thing up handed this one as well.

143
00:12:06,180 --> 00:12:13,400
So it works within this much distance whatever is the value of 6.5.

144
00:12:13,510 --> 00:12:16,850
I want to get something to say kilometers as well.

145
00:12:16,940 --> 00:12:28,950
I'm going to say copy and then after this say K ends kilometers or amateur's from home or anything that

146
00:12:28,980 --> 00:12:29,600
you want.

147
00:12:29,910 --> 00:12:32,070
And then we go one line down again.

148
00:12:32,160 --> 00:12:33,450
So as read on

149
00:12:37,130 --> 00:12:45,790
so user name I mean it lives in building number blaw works within kilometers from home as you can notice.

150
00:12:45,790 --> 00:12:55,290
We have a little issue here and that is we have so many decimal points in our flawed conversion.

151
00:12:55,330 --> 00:13:01,570
So if you want to restrict your flow conversion to a certain number of decimal places you can come in

152
00:13:01,570 --> 00:13:08,830
here and in your flawed file you formatting you can say point to for instance.

153
00:13:08,830 --> 00:13:11,830
That means up to two decimal points.

154
00:13:11,830 --> 00:13:17,730
If you put 16 it means up to 16 points but most likely you don't need that many.

155
00:13:17,890 --> 00:13:20,170
So I'm going to say Thornly point.

156
00:13:20,430 --> 00:13:24,050
And I guess I should have left the space in here as well.

157
00:13:24,190 --> 00:13:26,360
So that's read on this code now.

158
00:13:26,550 --> 00:13:35,450
And now we should see only this works within 6.5 0 kilometers from home.

159
00:13:35,710 --> 00:13:41,760
So on and so forth I'm not going to trouble you I'm making this code any longer than it is already.

160
00:13:41,860 --> 00:13:47,660
Let me quickly try and zoom into everything so you can see all of it together.

161
00:13:47,710 --> 00:13:54,380
I think we never use this city's number dropped out and I never used the floor somewhere dropped out.

162
00:13:54,520 --> 00:13:56,040
Feel free to add them.

163
00:13:56,050 --> 00:14:01,510
There isn't and dropping them is because I want to make sure that I can zoom into this screen so you

164
00:14:01,510 --> 00:14:03,440
can see everything together.

165
00:14:03,790 --> 00:14:06,240
All of it is kind of repetitious.

166
00:14:06,250 --> 00:14:09,790
None of it is really all that you have.

167
00:14:09,790 --> 00:14:12,210
The end is mutable thing.

168
00:14:12,220 --> 00:14:14,400
This is the initialization method.

169
00:14:14,400 --> 00:14:16,840
We will talk about this in future.

170
00:14:16,840 --> 00:14:24,530
This is adding new returns that's going several lines down this is adding a tab indenting the code in

171
00:14:24,730 --> 00:14:32,680
the text two to move to the right and then we have a static values and we have variables moving one

172
00:14:32,680 --> 00:14:34,900
line down and tabbing to the right.

173
00:14:34,900 --> 00:14:43,700
Then again I think you might use converting integers into strings adding them again converting floats

174
00:14:43,770 --> 00:14:46,960
ideas with two decimal points into strings.

175
00:14:47,200 --> 00:14:48,830
And then again adding them.

176
00:14:48,940 --> 00:14:54,250
And finally somebody was of course at the very end I don't need this tempo anymore because that's all

177
00:14:54,250 --> 00:14:55,400
I need to see.

178
00:14:55,720 --> 00:15:01,930
Let's run it one more time or one last time so we can see where you are.

179
00:15:02,120 --> 00:15:05,580
So that's about that's being managed to make some variables.

180
00:15:05,580 --> 00:15:12,650
I've managed to convert them into strings and put them all into one final thing that's being shown in

181
00:15:12,650 --> 00:15:13,370
here.

182
00:15:13,670 --> 00:15:20,390
With that in mind let's move on to our next list and I'm going to leave this screen here for just a

183
00:15:20,390 --> 00:15:26,440
few seconds if you need to either and or copy some of my code that I see in the next lesson.
