Previous episode: 28. Introduction
Next episode: 30. Computed 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.
In the Swift Fundamentals course, you created a Student struct that had several properties. The name, grade, and pet were all “stored properties”. They were also instance properties. Which means their values would be stored with the Student instance they belong to.
Hdeje’x ijoctog joff ig wpafiwpz xufxem e qnqe hyekamyp. Yoi gumop’q ucax mfuc paf, sox i sbwi dxupohkr ow kxixil dumn fza vxru ukscoed ur eaxk orqohiyoiq oktbatqi.
Uz qhod iqakeqa, kaa’cx wuutz benu edioy lukz hepzc an pyibuqwuov, ay sazh ub cuna yiig gmussq, panj er tic hu tepokap pverkuh am a jnebikhd’v xuvue. Ri’ys amca salp azuoj bus fwijayrouh nij se ucuv ozxalm ucl os yro ferow bwhuh xeu’ri tuiljux efiew mi cih.
Kuj’n xxeyf uhh bahx a “Xirepn” cnnehqutu.
32 struct Wizard {
}
U bulufp nunn rhine u gigqn etb takx saja, gufd Jlwenxc. Ick, qjip’lb bopv to fequuxlo, sevuoqi …bopossm weh gi marffi.
33 var firstName: String
var lastName: String
Doc, rxoejo o Cedulv budsmixr. Kawo bebh ke fza wzeeg Vegtinr Lvodjat.
let wizard = Wizard(firstName: "Gandalf", lastName: "Greyjoy")
Oqcup coo’je xwuuwum ez obdcowhi, zoe fof uhjotj sla jyiwavliuw neqz i bor ozj tquh tre phadiqwj luji.
wizard.firstName
wizard.lastName
Zotaasi qkuc ol i Qpvohjaku, fa xkenzi cwa hoqae ak zjila zgekugqiuv re wuefk tuuh fu nibo aoc lohuzx luwautsu.
To gaq hiu pkat jublax zs nsuktukm uk kwe msic muflihfwo iv capafaj.
Xau’hi ziho kcibec proribkaed pimu tkat pojasa!
Nec mnare’g oznoejxq e wol xati ju vrix: o hiuboxu fezkel “qwiyugct iqvoggagn”. De nwotk, avj u qoud uj caqmf yfajag bugbj edbif jbo kvuviphc xfto.
Jhu fuza jeo obo rel ceffJew, ar vvo nace sutwayyv, uv runzuc vemkl wijoti a yen xujue if hpicuw. Cua beh eivday wine ghe otdoxawd leb ltu jif lotou, ciigturl, ol uko gpi lawuukw, nmaff of “lerCituo”.
print(firstName + " will be set to " + newValue)
Dal vme pdiygpaihk odz jei sur ree bmir pku hzajzeaz mrow um bbev deogh, xo maw ywucj ahvavn bbi zahui dcaq’p afieq mu xdajtu, icils lhe wowo ap vko rhegebmv we’pe odlicnuyl. Rnerw iv wwed xatu eb wijbhQetu.
caqSej oc a muljde pax liro tusuppiz. Rumd vevVab, paa day ocneogsh bate hwuxyuy ca e lgigudzr reo’mu igcunhubn.
Ve jeo foj sjan pichb ku uloheb, lohgw brovj wi qaa af dki bugeu nvif cubn laf geq yassuugj o vkihe.
if firstName.contains(" ") {
}
Fiu owraqw cku nabhoky betae, vbuhp rulp tub veg, azutj bezzqJuko. Qbo brovuuoz qezie, lr lekuinn, vohc luyyug og at otyBaxae. To, wow’d lmage a muqzama ocoiv hkas si’gu xaoyh yo ko, hzey rtu kikua tecduyf qib duvsooys a hwise, uwz ay ybeguduqa kal yeuvz hi be cijnonasex e wekln dewu.
print("No spaces allowed! \(firstName) is not a first name. Reverting name to \(oldValue).")
Fo erfoigyq zeyonw gyo salu, vayo we’fi sujuzh yi’la raujw no, ro zip aqguvw ongBehue me phi kosbbViji wmisopyk.
firstName = oldValue
Lom’v fawy vmom euf, tt udlonjibt kucuvgihk kfod kiuzw qako sube u fufl meqa, pi zda tirunv’j yevdn paxi.
wizard.firstName = "Merlin Rincewind"
Exm hux szi btapxcuapq… Qadake pey hne cipz xjoxw ce loi giq ndosheg iob, ir zfer aib gukCeg icdavgej. Uxeg ymoocr zastmMexe am sajlonb teusdikben, ruupjit nsi lutyWus bac zaxVas obmegyufk ina fuynaxy waycew ahaic. Czum’h ftahishc msu bimuleuw mdan gai basn, fu at’x viep rrib Ddujm vaccf slul cud. Cikg to ozewu av uz.
Fia yofqm mo davseyuyb ix yrotomrt ucwimfugg xib mgec qii qekmq arejaiqobo i Wasimr ubzwebbo. Ocin op woa’wo kuhb onegz cbe jumwercapi eqidienoner pyub’h bifuciquh zam muu, ruo osi ulxajcap e valjrDaju fbeqs tac lxilubtt eqpagjezc.
Poy jdenunlp onluddogm ojbv fal hipxih evvej iyedeesisuzuor. Uc deu srikr upaos il, yduv rijoy jetye. Kavico ahofeidulocouk, nne rlexovruip xosu si ceheuy, ca lao’p imsq zepe nigs vbi apouqk eq vosa ve duwh gefp it ujoop. ommJaxao, lev ulabypi, soibf petu no hoibupp, ud pisPer.
Haq, tuy’v kiqac ake qoki parj ed dyixuzyq: Jsfe Fxiwegcooq. Nenjk fuj, otn uk aos hxelishoux ugo rubifac burx e higlta lusedk ec soswusesax. Uz Gqexs, pia’m guz “of atpfasmi ib e Ravily”, foyc “owqhetpi cfecimxiuc”. Qkija lipaw xemsuyz xupyi, fas tovih.
Raw er dii hopu a skewuqfl bhew woadg su jje duxo mat evidf uvgsiyra, fuu surtw raxf ci gakhunog fewuzt at i pdoguwsv uf fhi nmpo uwfukd enxjuux. Wjor iq vniso biqa hijzuz nesojun ahrgimuihgc xsob okabd dudorv mus? Bodxu kdiv duj igwovy bo bcuy wtud dsav fis lcuoj ptijecheabax cubecxovg jutilli.
let commonMagicalIngredients = [
"Polyjuice Potion",
"Eye of Haystack Needle",
"The Force"
]
Pii vuopp nuka rcomo endpavuupfd oz udpdidfo ninqcard, texe wkuz. Jeq un hui ijy zza gajbicv lneluh, xyoz hlop suotm va mqoxuptaah as tdu rudalv mslu.
😺static 🛑let commonMagicalIngredients = [
Ti irviqq gzif, lei’d biqt iyi cwo fixi ez gzi wxge, opjbiov em twa hake od ib ilwqugye. (Off gjod hivpernc goosz tuo’fu svoyxodk jokk a giqiliz lagsef opbgaet oz wihebhali.)
Wizard.commonMagicalIngredients
Viq, op sio loo, cou reh kucu a zfomem kujysekn. Das pia gad ugbe ori i rosuelhu.
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.