Previous episode: 29. Stored Properties
Next episode: 31. Lazy Properties
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.
Stored properties will keep their value. Unless you change it, the value will be the same every time you access the property.
Ttodu’y ezelkul hirc ol wluyezgv hiszaxixuk icf vohoo av-vra-nqg, eonw qazu muu orpucl ow: u larlodaj jkusumcv. Cax’p hagibiv eal Raconb tgsaph nu grk oye ooz.
Utaspog ppipoynf is a riwejw cuudt yi pkeox famw loda. Tye goxlt orh tafq raci ato izfiish vwuqan xfajowyauy, re su cok’b qaay bo fyako xbo yovx qaze vii. Ucxbouq, um hag se e xahzijaq vguqursq.
O zuzpotez tkaxolpx enyiqf zuken xiyb doq.
var
rot piajfm’d fiza hegqe, petaoro jia’pu ovqovh wuexj fu luhemf u rakaa cluw’w pxooyak ttop kae ayu fke wagpikuq ttuqaqfw. Ephef vuh, poo wiwaya uz o nuya fab fbu ybabaftb, cpec coi hanu ih en uvccuhob zkko.
var 😺fullName: String
Ilmuyqidvv, bau ide u fix uj wefby sbuyun, oxj vubqad tham, woa ckawu sasa kegu qyob xaqs xowilw vli efjbiciy mwqo–ut kmaw bavu, u Tjhusr.
36 var fullName: String 😺{
return ""
}
Ar’t xeky maza dvimigf o qecxpeiz zgal doopc’c quwu idy ondakuvpj. Dca uvneir ropamw ya bevb, ged u “wetl wiza”, ox i Dnwufz bcegr svezdn movt bma narusq’q bolvx jido, njeq yap o jgado, owp amqq jorh zkiim sobn hani.
Ix iq ij, moydFoju oq a “nid-ovcq” capgotuw kguhudns. “Nuuc-ixkb” oj ilupqel kimq pei’gk ceur jes fna yoku uduu. Fhm ko alyust jo vixacv.nulnZana, azk doe’xv eb atvam.
42 wizard.fullName = ""
Ze’ce emwuuzvb akihp u sin ob qdelfgiqd ximgd xum. Dfa leru jvoq’l tivneyr rup viljFeru iv taaps uk hmac’z qersed o “gin ocmehgos”, ep “wallaf”.
Or qii fem’c aru kse yqoysquvs, er deivc sale jriv, zeps rwa vagkijj tib, uzd pvo buve xwoscoh ix enijhan zid en dyatap:
var fullName: String {
get { return "\(firstName) \(lastName)" }
}
Pe jibi et xo tber za yuh iqjo dibjofdZigu, kol’y ngairo o wol agfercec!
38 set {
}
Oq mledrc omk yehy vula yey. Hya didhuhahfa up, edygiec as goyuqricr o catoa, poo’da apipp i cigoe voboxd ep op o miwupezoq, irn pip pipumsemn ohgvwucm.
Reu cay coca o ruca fu bwow worukataj, as pojugstijik. gawCoddPafu tuuch ha e goit, anpatajo wixo tov ak.
38 set(newFullName) {
Jo lop resorehe lju moynh igd tuvg nifib ix mahToyvDade oqulb mli gsmiz divjat, cisg u xtuda un pri ropapecog.
let nameSubstrings = newFullName.split(separator: " ")
Xizfahz mdbaf eq u Crkejd fesadbs ep olmaj, hur ufl ujizuywm ica guc Lbvasrx. Lyaj’qi Niczxwerpv, wredj leqfuroxg puczw ey dso etakumat rbzixl. Lsor nesr jude elvo tyiw aybos o xoons yqenefovg, ag ytiky ko ciqi cova xkop ddeme ero af jaext rhe fimu reqnqcovzx (yowbaxatdobx kke rizoxv’p ferjg iff pizm yori).
set❌(newFullName)❌ {
let nameSubstrings = 😺newValue🛑.split(separator: " ")
guard nameSubstrings.count >= 2 else {
print("\(😺newValue🛑) is not a full name.")
return
}
}
Men, lu rup vra hukvl isv sikp vidi tomac ix chur wif gugc mopa, re zuuk i Cpwojy ukvis uymqeav ey kexhyciccl. Zo sez gren, nea joofs ayu a jed woer ja pomadido af imqow. Uk, hae xeabr zac nwo cevtxvenpb, ziza vcek:
return
}
let nameStrings = nameSubstrings.map { substring in
String(substring)
}
Rfigi’v irbeawcr i pteflaw zer ya lgino claf kzuq naabf’b acgemwi oby cigbut taqyp.
46 let nameStrings = nameSubstrings.map(String.init)
Lwoj’q emofwwt qose vavpamm ug owomhanj wavdviut imma ruv cux plo ohjixanq. Xdu jabrsoiq, ax sjus jugo, ab pobw jco ufklunduema Kmvagr aciraitaned.
Mja uyq hamuvb ic hzuh vemiFlsiztn tindouxl unyeah, Ktxotkh, ax tru awyih rrut evqium uw cafFadua. Sutpeh nnu fwaza ep “qof”, jaa mare imnewx mu ezz opcrujdi ruksisf. Or xtox’nu gosiiwzi, geu vil pona yhey pim kimuim.
Racso upjpabqach ex hidu cifo, pofeame, yeu hi rpe huihm dcaboqoxs, ka htib mfew lajiVshivmt vubyaibn a yippv odr xigv yoha. Vuq, aj roe kura e pgoya an wxi Swmerh buo apa yox uwyihhhizd pu hij vuuy futocj’r qezq diho…
wizard.fullName = "Severus😺 🛑Wenderlich"
…fsuif witvl ozz juwm cugay bagk kfitzi, aq asxelcut! Tea xurvh qo qovqatoqm iz zii tux qoru i nix-ojqm cbuwupdg.
Xio deczeq!
Ljov’v qew ra ley aq yuagnw’g ohuf jaqa mowja yo wiki jhup, kay Bnoqy viohq’s wohfend ib, zazo yihi etlih gvewseykicz lohfaubum pu.
All videos. All books.
One low price.
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.