This Alison is going to be very simple in fact we're going to reach out to a lot of things that we have
done and we're going to bring them into an all US project.
So far we have been doing command line tools but now I'm going to bring some of these variables in on
our website and show you how to work there.
This would also be a good reminder for us of some of the things we learned in Iowa.
Some we haven't touched them in a while.
So let's jump back into school.
I'm going to say close this project give me a new project and this new project obviously is going to
be an eye or single view in our language.
Make sure that you keep it as objective see all the other things as before is going to be very very
close by ORUs.
So now they have this project what I'm going to do is I'm going to go to my storyboard file which is
here and this story will work fine.
I'm going to have one text view.
So I'm going here I don't find the text you want there I get over my project which is number down here
your user ID and say this is my text.
And then I'm going to use the assistant window as we've done many times before.
If you don't remember how to.
This is a good reminder for you.
I'm going to go to that age I go over this and say This guy is actually called the main text view.
So that is my main text.
Well I want to see different things.
So with that in mind this goes back to the main editor and move one to our AM NOW you know all of these
are comments and you can kind of get rid of them some delete all of those.
So I'm going to Warsaw reformats my view that lot and delete everything that is a comment.
I mean here I can go ahead and say main text view dot text and that I have to assign it to someone or
to some value.
So let's go ahead and add those guys.
I'm going to say integer.
My let's call Khalid's are my building my building number is 200 integer.
My float is not my fault.
My floor is let's say 6 and then a string.
My name is Amir.
And then also I have a string.
My city is Vancouver.
And then let's add another piece of information.
And that's going to be a float value.
So let's say a float on my watch this stance is let's say six point five kilometers.
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
all of these information inside one big string or in a mutable string.
Better to show us all of those information in here.
In the main text view.
So let's get started with that.
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
it final string and that is going to be just like the last time and as mutable a string string string
with a string on the string glistering actually says they're very difficult.
What is this.
Call it say use.
All right.
We're going to see at the very top of this text.
So so far it just says user.
And now I could actually go ahead and use it for my text.
So I'm going to say main text you that text because finding out a string.
What is important is everything that we do between these two.
As you can imagine right now if I run this application we will see the text you showing user on the
very top of it.
Let's see that in action.
Bill on my app.
And once it loads in my simulator I should be able to see that user.
All right so now I want to write a set of information here and I want to have them formatted one line
each line in each line I want to have it really nice and tidy.
I want them to be indented.
So let's see how you can do without user.
Then the next thing I want to have four finalists Thring is fine on a string.
Append string.
And when they want to append is this I want to go to three lines down.
So in here and it's not really a choice that you should make or should make at this point.
But if you want to you can constantly rerun your application so you can see what's happening.
So right now you could rewrite it except that it's going to be three lines down and I won't see anything.
So I could actually say finally string.
Append a string.
I'm going to have him provide you so I can see where I am currently.
That's Rondout I use the shortcut for which is command.
Or you could actually use that or you could just press that one so you can see user 1 2 3 9.
And we are here at 10.
But that's not the kind of thing I want to be I want to be at 10.
I want to be indented to the right.
So I'm going to say for the smashed sheet or if you want.
You can even separate out we can't say final this thing.
Append the string.
And so it essentially says user line line line and tab that's read on again and now redraws it says
use it and this is where we are right now.
So in a sort of 10 I actually want to say finalist Thring I penned this thing and this thing is going
to be user name for words and call them and that's what they want to hear.
So there is a user name space.
And then I want to say finally a string.
Append the string and tweet.
I want to add my name.
So let's see what we have right now.
We should have user name equals my name and then immediately tempy should show up because we haven't
told them to go the next line.
So I'm going to do that and I'm going to say find this thing.
Append the string go one line down and that's very simple.
So that's wrong that
could use our name here and then goes the next line up something I wanted to mention that there is no
particular reason to do it one way or another.
I usually do all of my coding like this I leave a little space between the columns and there the text
that comes to the right of it you can make your own format or if you want you can basically stick to
the way that I'm doing until you get a better sense of you know how you want it to be done.
Now that we know this thought is working I want the temp to be aligned with the user name as well.
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
tablet for word as well.
And then the rest of it becomes you know quite repetitive some can actually get copied as part
I'm going to say then say levels in building
number and then I have to have this guy my number.
However remember that this building number is not a string it's an integer.
So we have to kind of format that value.
If you remember this was formatting and as a string string with format.
The format is our I and my building number and now we have to see both of those.
Let's see.
So now we have a user name.
I mean lives in building number blah blah.
If this doesn't really make all this sense for you and this you know multiple brackets is confusing
you Art.
Let's change that a little bit.
I'm going to say in here we have a string.
I'm going to say for my third string of building you can name your valuables whichever way you like
and you can make them really long but you can just say you know if you know what that is I usually tend
to give them a you know a much longer name that kind of makes sense maybe not as long as this one.
But there's certainly nothing wrong with doing this either.
So I'm going to say for Martha this thing of building is this get it cut out place it here.
So this is the formatted version.
Let me change just a little bit so let's call it building a string.
Building a string is the formatted version of this text.
I could get myself a little bit of space.
Perfect.
So so far I have the lives in building and then I've got that extreme value of my number which used
to be an integer and now I'm going to get my final listing to append this value to its So be converted
into a string and be connected or appended to a string.
That's right again and nothing should have changed.
It should work exactly the way you expected it.
Perfect.
Now because they got their lives in building number but I had this only one more time with the flow
of ideas.
So in here I have to remember to leave this part which is essentially giving it another line of other
tab.
So I'm going to copy that in here war weeks between now and works within what the distance works within.
I know I have to convert my designs into a string so I'm going to say this thing the science a string
is a string a string with format float value of my work stands.
So it takes my work this converted based on a float into a new format of a string and puts it in something
called distance testing.
And now I'm going to say find this thing up handed this one as well.
So it works within this much distance whatever is the value of 6.5.
I want to get something to say kilometers as well.
I'm going to say copy and then after this say K ends kilometers or amateur's from home or anything that
you want.
And then we go one line down again.
So as read on
so user name I mean it lives in building number blaw works within kilometers from home as you can notice.
We have a little issue here and that is we have so many decimal points in our flawed conversion.
So if you want to restrict your flow conversion to a certain number of decimal places you can come in
here and in your flawed file you formatting you can say point to for instance.
That means up to two decimal points.
If you put 16 it means up to 16 points but most likely you don't need that many.
So I'm going to say Thornly point.
And I guess I should have left the space in here as well.
So that's read on this code now.
And now we should see only this works within 6.5 0 kilometers from home.
So on and so forth I'm not going to trouble you I'm making this code any longer than it is already.
Let me quickly try and zoom into everything so you can see all of it together.
I think we never use this city's number dropped out and I never used the floor somewhere dropped out.
Feel free to add them.
There isn't and dropping them is because I want to make sure that I can zoom into this screen so you
can see everything together.
All of it is kind of repetitious.
None of it is really all that you have.
The end is mutable thing.
This is the initialization method.
We will talk about this in future.
This is adding new returns that's going several lines down this is adding a tab indenting the code in
the text two to move to the right and then we have a static values and we have variables moving one
line down and tabbing to the right.
Then again I think you might use converting integers into strings adding them again converting floats
ideas with two decimal points into strings.
And then again adding them.
And finally somebody was of course at the very end I don't need this tempo anymore because that's all
I need to see.
Let's run it one more time or one last time so we can see where you are.
So that's about that's being managed to make some variables.
I've managed to convert them into strings and put them all into one final thing that's being shown in
here.
With that in mind let's move on to our next list and I'm going to leave this screen here for just a
few seconds if you need to either and or copy some of my code that I see in the next lesson.