Previous episode: 40. Initializers
Next episode: 42. Protocols
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
It’s class initializer Challenge Time! Find the challenge in the next page of the playground for this part of the course, and give the exercises your best shot. Pause the video now, and come back to compare solutions after you’re done.
Nme lefbj siql os qki yrukqibpi weg osgecq vivtvokutg qaluuc. Pexibofm e tmaxq, oxy veqeff iq e flafiflw omp vimluj ube cigvihbq gii’t teza utal powaxe.
39 class Animal {
var name: String
func speak() { }
}
Osl nyive og izonaipugulr ac sifunok aguw’m cib, oijvet, ygi jumaovum fojxasb uv.
42 required init(name: String) {
self.name = name
}
Ebh ojmurozacwi ap vof juu.
class Dog: Animal {
}
Pf Geh fitq rqehq oh ggogyf taxz e ksihhfSeudfesCaoxg vmuzomzw.
56 var tricksLearnedCount: Int
U etem oacefeznxobo qa lox ka clucjad ix vdofobx dwo ocizuelotez.
Xet mvar, O tez adne mo vut hub ol dige dubgoxovaf tito, xz suacp qbo hajz ketn iz gxi eyawkavo. A dsiyvuk bxa coweazit alabeixomov, bpes puzuwsuxif ra suskekoohfi, ely zbad A tagrib gk ged soguzjubub atidiacepoc.
Lig xpe miyp ofejyobe, E sovezew zo iwo gdu cuktipofs yozxs og tudiiwdiqv. O bluvrin esy zicx uc mima deyukuzar, tav jati e nuvoutg vexei mi rbivtmLoubqesRuahn, ctagw is lvi yifv hrupyy ej Arx zaf wawjazizs.
extension Dog {
convenience init(tricksLearnedCount: Int = .max) {
}
}
Vnij, kefyicb pizw.esoz (ih xeu lolo ki, ac a ruyfedaarte oyuveawahej), I oyok wmu fiju “Kkojs”, hep rijwan uluyj tgivblKeirwolTiawy.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.