Swift for Beginners Part 7 - Optionals & Unwrapping

preview_player
Показать описание
iOS Academy offers the #1 course for iOS Development for Beginners. Learn to create iPhone and iPad apps from scratch. Everyone these days has an app idea; learn the important skill of making those apps, make yourself more marketable, change industries to get a different job, and enjoy the ride!

#swift #development #ios #app #beginners
Рекомендации по теме
Комментарии
Автор

I learned the concept of optional variables as candies that need to be unwrapped to get what's inside...

ahsanejaz
Автор

You made that all so incredibly clear, thank you.

s.sbless
Автор

10:21 - Well, the other reason it was yelling before is because you typed "prince" instead of "price" in one spot. 🙂

KipIngram
Автор

your videos are golden. There's no one else creating these like you, I was previously watching Code with ...., and I had to stop when they started doing math but with your videos, they are easy to follow along and I appreciate you and your content. I hope you keep these videos going and it bring you more levels of success !

wensmusic
Автор

Thank you so much for all your contents. Keep it up!!!

herisusanto
Автор

Been watching this over and over, different videos and it`s still so confusing. Whoever came up with this idea definitely admired Schrödinger. For the ones who say programming is easy...no, it`s not. Will keep on trying though...might eventually get it.

salinas
Автор

What's in the box! What's in the box!!!! lol. great video.

cainosaurous_rex
Автор

var x: Int? = 3
var y: Int? = 5
var result = x! + y!
print(result)

Powergeek
Автор

nice explanation!! thank you but i wish Nil Coalescing Operator was mentioned as well

ralali
Автор

If a variable is unwrapped like bellow does x become a constant because of the use of (let)? And why can’t we use just x after we unwrap instead of value?
Var x:Int = 3
Var y:Int = 12
If let value = x {

If let value2 = y{

Let result = value + value2
Print(result)
}

}

rcnttbu
Автор

wish there were little more about optionals. if let - is easy to understand, no questions.
But anyway, its better to make 100% clear what you teach than put tons of tasks and be inefficient.(like most of Tutors out there)
Thanks

Natena
Автор

Hello, I'am confused also, could you possibly help me solve this? So I have code which is in a tableview with multiple cells. Each cell has a button, textfield and a label. At runtime I get a crash if a textfield is empty, the user won't always enter a number into a the textfield. The button will perform calculations and enter a total into the label. Therefore the label will also be empty. If there's nothing entered into the textfield it should enter 0 in textfield and label with button push. This is the error I get... Fatal error: Unexpectedly found nil while unwrapping an Optional value:

@IBAction func calculateButton(_sender: Any) {

dollarValueLabel.text =
halveValueLabel.text =
quarterValueLabel.text =
dimeValueLabel.text =
nickelValueLabel.text =
pennyValueLabel.text =

}
Nice work on your videos!
Thank you, LH

hermdetector
Автор

I think Java did a better job with their way of doing unboxing and autoboxing tbh

alexmisra
Автор

With the 25 years experience of writing loose typed language, I find strong typed languages so DUMB.
I have been using Javascript, PHP, Perl, and other, the ratio of bugs my code because of the type of the variables are
This is not a language, it is a error generating torture program

telesohbet