yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Objective-C iPhone Programming Lesson 1 | Part 2


less than 1m read
·Nov 3, 2024

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!

More Articles

View All
How does a whip break the sound barrier? (Slow Motion Shockwave formation) - Smarter Every Day 207
(Whooshing) (Smacking) - What’s up, I’m Destin, this is Smarter Every Day. This is the tip of a bull whip and that crack you hear is this breaking the sound barrier. My question is why or how? Like, if you think about it, your arm’s never leaving your bod…
15 Things You Say You'll Do But Don't
Sometimes it seems like we enjoy letting ourselves down. When we look at all the things we say we’ll do but don’t do, it seems crazy. Many of those things are totally incompatible with your skills, lifestyle, and history of sticking to goals. And funny en…
The Big Misconception About Electricity
This video was sponsored by Caséta by Lutron. Imagine you have a giant circuit consisting of a battery, a switch, a light bulb, and two wires, which are each 300,000 kilometers long. That is the distance light travels in one second. So, they would reach o…
Rainn Wilson Rappels Across a Ravine | Running Wild with Bear Grylls
RAINN: I guess I just, I’m gonna step off the edge. BEAR: Okay, Rainn. I’m not entirely sure how strong these ropes are, so just ease yourself off it. BEAR (off-screen): Actor Rainn Wilson and I are only a few miles from our extraction point. But a deep r…
Is Getting Into Business With Family A Mistake? | New York Live
In America, 65% of our economy is driven by small business. It’s the essence of where jobs are created, and most of those are family businesses. You know, you’ve got a situation where a mother is suing a daughter. Can you imagine? Can you imagine what tha…
STRAPPED INTO A FALLING HELICOPTER - Smarter Every Day 154
Hey, it’s me, Destin. Welcome back to Smarter Every Day. One of the reasons I absolutely love helicopters is that you can get places that you can’t with any other device. So today, I’m with Bradley Friesen here in… where? Bradley: We’re, uh, right now in…