Objective-C iPhone Programming Lesson 1 | Part 2
Hey guys, this is Mids And1 with part two of Objective C lesson one.
And so, if we run this, it will semi do what we wish, then not completely. All right, so we can type Alex, click hi; that now says Alex.
The thing is, it doesn't say "Hello Alex." So to do this, we're going to do a bit more complicated code. Um, I'm not going to explain this to you right yet.
All right, so this is basically saying take the piece of text "Hello," append our text. All right? What you have to understand is this right here, this line of code represents a piece of text.
This line of code represents a piece of text. This line of code together represents a piece of text. When you do setText:
you have to have something that represents a piece of text.
After a piece of text, just like a UI label or UI text field, have something called on it called setText:
. Text itself can have something called on it called stringByAppendingString:
, which adds more text onto it.
So, we're going to take the text "Hello " and add on to the end of it the text of our text field. Now, if we run this, Alex, hello Alex! Right?
I can type bill. Right. Um, so this is our first hello world application for the iPhone. You can experiment with some of the stuff I've taught you: do multiple labels, uh, stuff like that.
Um, expect to hear from me shortly on my next uh, tutorial. So, thanks for watching M kids in one. Subscribe and goodbye. Bye!