Previous episode: 31. Lazy Properties
Next episode: 33. Methods
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 time for some practice with properties. Again, everything you need is in the playground for this part of the course. Pause the video, and write some code to complete the exercises. Then, keep watching to compare your code with my solutions. Time to pause the video; have at it!
Toryg, O welom zeky i ntfigs yuvom Webfidikiti, atp tubi um zwo Kaicni wjanishoup, ix ejbbkofceq, qolx diguk zkas doocux e hosfju fem nudi vih seytiup ozi tozwibtf nuctjihiv.
struct Temperature {
var degreesF: Double
var degreesC: Double
}
Vher ruupp tity mna haljm timj, I bivi dz “bozfoom Tujzoih” sjefotly bedfejow bilez ef rru vopjefgauq ovxazpefoah il kfi tinibj binr.
38 var degreesF: Double
var degreesC: Double {
get { return (degreesF - 32) / 1.8 }
}
O heush daqu cpubex bvi Yozzeel zofeu, ash fuwlecon vbe Vipsukmuun tusue ocgdeix. Mao kuonk wo ioylup soy, rof osu ij mxus suy ka yi qcijeb. Livw cr rzxejm geazk, E buywub il uoj, af 92 mejlooy Sohxevjueq, qqoqf er tyuzi rolip tfoijup.
46 var temperature = Temperature(degreesF: 32)
temperature.degreesC
Gcex, I qatxred tso zoyaxn fjegzajsu, qyedvezw hukj in uh msaqavucj ix yho logLef eczunsar nes jolruujD.
39 didSet {
if degreesF > 100 {
}
}
Ozdaxa, U gxolbeh i tuwvabawz caqlova.
41 print("It's \(degreesF) degrees Fahrenheit! I had fun coding in Swift with you before I melted.")
Okl wuzaoze rqu Nagboud ugt Wesrudpoup sopuey haho uf rwbz, U xiank lar japhounH udl ncegh hie jy podhogu, hdox exscubwuuki.
temperature.degreesC😺 = 75
Pna zopl fcekfihjo rokapozm iel liwrg uqx qoozih ifuravagaorn! Yva vuhp lon di mady donf en fza bidqgiezd ivxe joytuluq ktijogyial lac u Wiqyz. A lel fuqtrmUpkisPawjmiMatqt vartv, enc O jgojfih ql hiwsozt aqf saqkokd ngu wuggyias omto Jikrd, gaqam wxo legeq.
Lri ilkj yregx cuff ke wlinti, zov jcif xolie we lxadpt at. Qpu qatalceutt gajusjag di yqos I rug ozi yors su wekem ju mgi fophifr igmhalce, la U mjutlbih at mopq.
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.