Swift Programming Language Tutorial Part 4 (Classes)

preview_player
Показать описание
@SkipAllMighty
Best viewed in 4k!
Leave comments on any errata
Covering:
Classes 0:00
Рекомендации по теме
Комментарии
Автор

Best Swift tutorial series on Youtube right now bar none! Congratulations! You are an excellent teacher sire! 

YoLninYo
Автор

This is the best class tutorial I've seen and been able to understand - thank you!

tacolotto
Автор

Excellent! So much Clarity . thank you very much Skip

marcb
Автор

Keep up the great work! Your tutorials are the best, as others have said. Perfect speed and clarity for multiple viewings too. (I'm

NeopolitianNPLTN
Автор

Great Tutorial.... Really with detail explanation 
looking forward for more video like this 

Thanks for sharing here with the efforts you make

mohammedhabeeb
Автор

Excellent tutorial, Thanks for making it available for free.

baljindersingh-ggpr
Автор

you explained in a way i finally understand classes. classes thank you

hamzashaikh
Автор

Please keep going on we are new in this job

mdkamrulhasan
Автор

Hi Skip Wilson. Very good tutorial. Thanks

dev.coskun
Автор

I want you to make a separate tutorial all about Janet, the mutant who teleports and also sings. 

codyromano
Автор

thanks man! very good job! very clear explanations!

ОлегТокмачев-вц
Автор

Thanks so much for making this channel it's so useful! But I just don't understand the difference between a 'class func' and a function you make inside a class. Is there a reason to use either of them over the other?

lilymirar
Автор

Following the tutorial example, we can identify 2 "John", one is person and another is mutant. Please note that init external name is the part of func signature. the "override" in Mutant init() is needed.
class Person {
    var name: String
    
    init(name:String) {
        self.name = name
    }
    
    func showBeing()->String {
        return "Human"
    }
}
class Mutant: Person {
    override init(name:String) {
        super.init(name: name)
    }
    override func showBeing()->String {
        return"Mutant"
    }
}

var beings:[Person] = [Person(name: "John"), Mutant(name: "John")]
for (index, value) in enumerate(beings) {
    println("\(index): \(value.showBeing())")
}

amao
Автор

Interesting tutorials, thanks. Are any files for the series available for download anywhere (in particular for the moment the .png files) so one can easily work along?

kfeuerherm
Автор

Hi Skip

If you could please clarify why you would want to initialize the properties separately as apposed to initializing them in the same line that would be great. Or why you would want to do it one way over the other?

Here's some example code for reference:

class tipCaculatorOne {
    
    let total: Int
    let taxPct: Int
    
    init(total: Int, taxPct: Int) {
        self.total = total
        self.taxPct = taxPct
    }
}

class tipCaculatorTwo {
    let total: Int = 2
    let taxPct: Int = 2

soyhenryxyz
Автор

Good tutorial but really difficult to see the small text.

florenceluvr
Автор

at 16:40 while defining:
class SimpleClassTwo {
    var rect:CGRect = CGRect(x: 0.0, y: 0.0, width: 100, height: 1000)  //struct as property of class
}

i get an error: use of undeclared type 'CGRect'

on XCode Beta 3, imported Cocoa framework. 
And under Utitlities > File Inspector settings are:
Type: Default - swift playground,
Playground Settings platform: OS X

So what could be wrong?

leonardjonathanoh
Автор

Why are you assigning the nickname string to nil?

fidjjdfjdjdjddj
Автор

can you run the code in a playground completely?

kadinsayani
Автор

at 5:30 it is showing your results in the right panel of the screen. On my screen, it is just saying person. what am i doing wrong?

Mundane_Commons