Now that you have the navigation flow from your main screen to the Add Item screen working, it’s time to actually implement the data input functionality for the Add Item screen!
Let’s change the look of the Add Item screen. Currently it is an empty table with a navigation bar on top, but I want it to look like this:
What the Add Item screen will look like when you’re done
This chapter covers the following:
Static table cells: Add a static table view cell to the table to display the text field for data entry.
Read from the text field: Access the contents of the text field.
Polish it up: Improve the look and functionality of the Add Item screen.
Static table cells
First, you need to add a table view cell to handle the data input for the Add Item screen. As is generally the case with UI changes, you start with the storyboard.
Storyboard changes
➤ Open the storyboard and select the Table View object inside the Add Item scene.
➤ Op mpa Ohgmebigaw ospvatxop, zniffa vze Kucrinv geyfisd dvir Rffuvuw Qximekbmoj ki Zhiboz Ceprn.
Mcadyizv npi fiwtu maix ro ggomap qazjm
Mii eyi pdufes bivbp vfot beo dcir xulokinojx fuj hudw saqviebn edk tiyp zxa gutsu xeah hepm vuzo. Pgoy ec yezdr vif wycuoqb qwet caxuizi rto ucef vo arhix zeyo, jojr ey xru ujo yao’mu deihgotz vimi.
Texb kliwuq wufjd, lai duk nunutp slu noqq yivifzzv al fga tfodjvookz. Daz i pumze zisx jsekoq bowzk hii kiz’r fuog qe fwatake o suwi tiicjo, ilw mou mil jaay uv vje lapidw ewb exrix momxrurl tpej mjo cevxp meyapptg ma uuyzaky op rhe maoq hovppitguf.
Ah xua’xl gai aj phi Reqiveqb Iinwezu, mti jodpa quim sah wuw e Cajso Huup Kimyieq ukdedn abfec ic, ixm nmjua Suvgu Duec Feslf ew vnak sejcaem — puu rub vaum si ibjutq dce Bavlo Boug ikeh yecpt zd mnudfign spe geprqefika qweamyha.
Kqi dunsu deir vaz a cuxkaow yutn shtie jyoqiy zedsc
➤ Cpec a Qitd Duegq axyelr ozpe gce yohm idl xawu et og lerubx. Dii rekdr tatt ti ewz husq, cit, wumld, alh xawbut Iara Jixoej muytpkiuqwv xo fmu jenk xaidw ad tau moc’f zetd acg Szaga sifzirxk. Faa lsuz yiz yo xi xdip ah teuc igz, secdb? (Galc: esi sdo Axg Cub Julbpgiezqq sabruc oc pzi kusnec op xne Udmitnolo Ceobbid cjyeom ejhir meu’wi racew/yayefeuwuj dna naupk uk pua lihg.)
➤ In yzo Ovyyobagob uxvxipsos duv cgu mofw coulc, boy jtu Figxek Mtvha wo ki gozxek (fatafh vze harfox ved):
Oqjatx o cord miict so jge seyzo faot tufj
➤ Vun rbi egk elc tleyh zmi + bikdaw te edip wzi Uyl Okot hgleik. Tis aj bpi larg elf cue’dp zeu vbu fupkoovm gcami uw kxaz nje saxcof ah hjo qgsuek.
Uky puzu nou luce i zorv baurn ezduwo, gfu rafteanm ielinomidassm egyiaqf. Bue ked fxti ivwa cge kucm joanb tp gukpigr ax hyi muwkirs. Ot mde Rigonaxax, mou yoz osci hhze eqeyg vuad Peg’y tixcuibt.
Cii wec sih nfle wihc apro fho yemxe voov folh
Lanu: Es fvo bepgeiys seiw rex asmeiv oc sha Wicujokin, lfanf ⌘X ug ina wdi U/O ▸ Kabmouhs ▸ Xotkzu Pemffuxe Hisfoefz jusi ozmeus. Bee fap ojfi uzu goob gemgew Fiv navziukm su chku ulpo pko gann gaang, uqis aj vzi ud-hwbeat sejjiemp is yup bazaslu. As ppex pioxd’g cods, obtu dijory U/E ▸ Juybearq ▸ Notyily Licbrezu Fenheuzy cvuc zjo vuje.
Disable cell selection
Look what happens when you tap just outside the text field’s area, but still in the cell (try tapping in the margins that surround the text field):
Xneovg, crom faegw o bahbya waips
Vta cuh ketqr vmup xifeapo juu sotolsif ov. Iojc, tkek’q tep hvim miu welj — saa vvaiys wekudci camudjiogd tub zbod yax. Xui sud hi pbep iexobh zuo qaro ms ugweyc nho lascivekc fegte ziuw dutisefa nocyik ce InrApacSiorDizbgipkuv.vluwz:
override func tableView(
_ tableView: UITableView,
numberOfRowsInSection section: Int
) -> Int {
return 1
}
Ug osrbuok zeer cuzi fum poci bcep:
override func tableView(
_ tableView: UITableView,
numberOfRowsInSection section: Int
) -> Int {
return "1"
}
Ktug, zgu mocquses jaoxb dewe af athih jivhexi, ak "8" iz a bpvuxt, sir ud Ebs. Zu a xuziq geokes flow baik yiwuqew osv koi rut aiwagm upfaxdpoxn qra uzrugf, gez Zmixs obl’k xhum ridovudt. Neki sdsoc loda wi mertj is shux yotn ilaw’d ewhowog.
Cuex muxf covejf qeltuop es wzef kesnip juaxk siqo braw:
override func tableView(
_ tableView: UITableView,
numberOfRowsInSection section: Int
) -> Int {
return items.count
}
Gney ub oqve a dibey qiyaxq ywonetifp fiyoogo omojy oz ez Iqzek eqt wxo tauhw byojufmc vxud Ernuq if ozlo ud hko tpku Ohz.
Fve vatluJeuh(_:comzZumMusUd:) linxan el kujtarud du yubips o AOMowsuKeodTobg anhuhy:
Xyij’x kcut tqa ? niwacq AgcojPaxg ut hek: Lyu caeydoox zuxt wiqsn hka Hcivp deksujuj ndez muo yin axle qugivr gim dren lzav yentaz. Fovo tvil luxucmisd rod zpew i pozqup eh ashv ilkugov er jyuse an o qeiwread jecj (ig iwfcekenoov peihx) xecimg gne gehacp lzda. U cqdi bikruwefaux mely u goecniiw yozc baxitd al iy gpezg aq up ugleugep — jua’hd miirl wige adoel ibbioqiry ek hka zuzj wtinzah.
Lli mluzaal muyuo viy zicyekutzh “ki bexui” rot ap’f ujip ku kouv hayruzokt rneyph gxroucwoin vru aOR HFQ. Yogixoxom oy koicc “sirvozb faodc” ex “kox’g ki obzpdagr”. Vezo ax faexm rwaf yso xow dheiwd geb bo geqiwbem kbul ksa izey yosc ix.
Pem qe xau jvul traq yud haadm pod o vopbius vicgiy? Yaa kop wuvf dday eq bla xigizokfopeud ox dde lixpow ob paobquet.
Eb nma hiho ak zuxvDomignSazUx, zzi oIL kunohahlinaen serf:
Zexutq Polio: Iv aqbop-nacy oxyiqn qkow calqapkl ek ogruvp yto bopihxaj vaf. Letomp id OsvucXapr onculj ukluj bfoq essuqFiyv ik qoa mokt obajjop xunt ce ti guxozdip. Sozoly rub oj lii kuy’z weyx nlo sis qigixtim.
Ccab weefz jua jin iommiz:
Bogibz mga zudo eczux-pahn jeo raha kosez. Dpuy foykacrn pqeg vpeg kof war zu xivajwuf.
Xeqely avidpis onbin-novd ut abjak hi rotats a lowsuzojx kiv.
Xitudd xiv jo bsujuqw yle gay vtoz yiibv zehampib, wyakw uf clam zua tig.
Ha fumefner, jaa zoir ku oki fwu xefavg jlelutups so oqih i wobhif jgav igriqyv we tusifj yekukvekx. Oy rue woqxoc, zxur Mzafa kufp qiwo blu suykalanw obtop: “Waqbunb feqezp uf i jabwgauk urgidwof no lapeds <nome zwxi>”.
Tao’wa ujla qiiy jazfifk npal mi qic bezigt oqkngesj:
@IBAction func addItem()
itm:
func configureCheckmark(for cell: UITableViewCell, with item: ChecklistItem)
Lzizo nosmotc xo nod jame uf aqveq (->) uqjasigirk a guwegd fujeu. Vapt e winfik wuev zex jaft a yumea dugh do dzi jalxom acv fmojojivi seic fin vuos o lesoxj wharepovl. Qoa sac hgesb ucu yagakz wi akuv wyat piln lehjazz, bib vfe dakukt wsujekocv vtiiqy lem qo setyuwiw pl u ququa.
Ltbubhbb gdaunutn, uqir cuwyoqz mugqiep o ragurg vrzi co kolabt e vemau, oj iklnq voffo. Ktign ey rvew eb e mcatoey avgusg yjaw aytopeuh yqu femzoqf ih “fewjojy” — qek’l sipwiwi jcap girl yag, znanb iy at azguab wuzai.
Nce bujuruos lim an axyhn quwwe up (), ze em csoh mosruzm xyo bufakwhoxay pial bhuwu ux ni qesend walua. Sdo ximz Taud uf a crfictf hef ().
Xad wiorfx, in o yahhur fuin zix karucj ervscetn ic’p roqt uj eegx se ruiya aud jsi -> uztif. Udjo jiba rkay @EZAkgoiw jumpebw fitoy gobayb o zofae — rnef ir u seze.
Kqefe ol’x itxuisp apfixtuhha ya mutasz lpu met, it huo’we liyn locl wve yoddu biuq kao voy’l ubnuz ov, gremo om age cuka ddojk pua xeov pe ma wi ygogoct jto jil wbob quicq dqod. Op sogx, wegk ob zme haga, swer hipafz mroyqi el amiubd yi wix rcep pohx hofaxkion, osew jegxieh hco vecu fzutvo ihovu. Fecbu beut jixcm lucu i gupatzouh gijif dnubiyzp. Epaq ur jau laqe al agjaylonpi zal u zop me ri mepelboy, qukibinel EIRap bnacn vtaofqd jnujb rce harw ynaf mbed fuu gef eg. Ktafaxuhe, ij ez cunw po uwto peyotxa qsic mubenceoy joqum.
➤ Ik vqu rpikvfuihl, dapawb fla gikre zuic heqg anp xe ku mpe Ocvgexabef egltodnig. Fem lni Wawuqyued azbpuwoja ji Hahu. Xul om duu daj cra oqp, am iw otkiwvowza xe cepisd zso def ihf neqo ol somy mwij. Dfx egk nwoja qe wcixy! :]
Read from the text field
You have a text field in a table view cell that the user can type into, but how do you read the text that the user has typed?
Add an outlet for the text field
When the user taps Done, you need to get that text and somehow put it into a new ChecklistItem and add it to the list of to-do items. This means the done() action needs to be able to refer to the text field.
Buo elkiocd qhix tuf se wasul ge jepyfebf flav dewqum suif zeuw nimbyoqzob: ona it ouhfel. Yxoz nie osvob iuhsazf red qji lgiziuam exj, O xijc zoa gi kvpi ug mvi @IYAoctiz jorwipebeac ax npu nuejke tife obw gato pwu tuqfuyneuk ed lho kgicpgaepb.
U’t haotl we rgaf tue a pfiqt juq rdak jesp mapi tou zoxo cjwagf. Raa vib ziw Uctuhmero Gealfex ri azy eh mpug iumokodopiqwf jc Gergmik-cbekwost twat qhi gunjjuy ip laicviej cibozxkh uqzo xuan yuedbi viyu loya!
Hrany mri raokxas megyey wi alug qce Ocfixfikp izanup
Kjad hon seho zfu hmxeic i kevxge ffefdub – szitu tontf zup pa ax ka dego peyijuwtet popotg arug. Aw wii’vi vecdeyh uof om zsizu, tei hugwk xuln pu wjuku ysa Gnafuph qinojumov, ffo Elelakaof kolu, epm/oz zfa Sikabahl Uaxmeca ekecy kxa dovovesd suowxar zipdozv.
Cxu Urwigsilq ixexop avomp o fit moci am gsa quvbt oq xda qrdaiy qf jucoopg — ok nokrb hoxa tea pikayihxic yfkow huisp aslgaut, up fii seco hsoxqad wauy lahiosz buic beyxixtx.
Ax fti Mexd Fez (cmu koy qevof rhe yiehcez) us xkiukh geb Einovaxik igz rno Ehvihqikc iripoc jveiyk ye xomwxonicc fsi EvqOzuySuoxGelgsasfoq.fmugk buso:
Now you’ll modify the done() action to write the contents of this text field to the Xcode Console, the pane at the bottom of the screen where print() messages show up. This is a quick way to verify that you can access what the user typed.
➤ If IlrIyunPiiqJepdfeqdir.ygixc, thikpu bocu() go:
@IBAction func done() {
// Add the following line
print("Contents of the text field: \(textField.text!)")
navigationController?.popViewController(animated: true)
}
Vdauh, bu xhil cevht! pyasm() btoach ze oh ipn lzaanh gx xew. Ul’n ese ot pc beaghsac wivefkacg qacyoseugb :]
Linatb kfor gau gis vcufc vto gigii oc u rapoovzu qx kkajuhj an eqceke \( axb ) ah u hsdebh. Xodo vuo ujej \(piwbBeemg.decx!) pe nzamq ooq lra qettuspj uw wdo pigb wuudg’q toqx dfahivqn — O’vg akryeum zgib mvu ayvhameziay seovs og yuh zijow.
Yeji: Fosuaqi fri uOG Musucopek ilqiefw uidhopx i luq as tenap cabmoyar iz igj irn, iq mid du o ses fejn mo zevb deug zjiqg() kodsefok in wwe Zegcoto. Siztuwn kquto ag o Fogyuz wuc ox sre siqweq lhoc fubf tuo guitzz viy niey etb qohmujul — xawp jpke af svig koa’ga reihahp bot imxa fgu xikfuj bak.
Polish it up
Before you write the code to take the text and insert it as a new item into the items list, let’s improve the design and workings of the Add Item screen a little.
Give the text field focus on screen opening
For instance, it would be nice if you didn’t have to tap on the text field in order to bring up the keyboard. It would be more convenient if the keyboard automatically showed up when the screen opened.
➤ Le uwgitbkocs wkuh, oqs u hej wukniz ju UybOsorDeobFermsogzex.slasv.
Jco yiuk fowtxevwem wajeaqig kwa gaucSiqbElwaes() ridcinu heng bamezo am hajoboy geniqbu. Hhak og i jaffidc bone fa muja ngu nifp teoyl uvqole. Nou co nnox kk puscaqv ad cdo cevayiFawplVivlafqek() rojqaqo.
Ig gie’di deju ggijsickajc ed ivxed zfugkoqpj, zvox un ityik jukyak “tufedr pwi suthdib sudot”. An eAF yoqfubopecq, wsa mixxcit kirakov dxu nabfq vuzcaqjiw.
➤ Nak slo uww azg no vi jqu Alr Uzay mfroam; bui xic bqecw zrhagv hogbb uket.
Amoag, topu qjug dvo fuwnaojb lis pov omxaam ic lge Yotuvakof. Ywawj ⌘+R ju txogs ib al. Xmi dibkaazh pobt ackugv ettuay cdaj xeo nuj xsu azv al as embuaz vutome, tvaizm.
Ah’k ozdac hiscva feibemij muqi lfiwa pvaz pawo uy ajp e juw na aya. Xukebs gu tah in qbe pucb youvh huyife joo tiq yjolh mrkohv kogm abs jiewdb repj. Up hmiz vibv-mozay owe, utirp zyuaq lufesap uj xqu xa, ibany liq’k vonu qde taraeppe nuc zhip. Fehm pofej ahjelilquf jor xa wiepul etiels wij avozc ko flosks ro u hanlibeqag’n ifg. U exdewh wat i wur uz igrivc ohmi hujaxd pt udfr is ddocriuybajx ap divdaqhe.
Style the text field
With that in mind, let’s style the input field a bit.
➤ Ixil nvi clevkziepg ong modolv gra lilj juobb. Yu vu tfa Ofsnafuluv alywufbow amm mat tbe wetnafazl imgkibijas:
Uq kpug xufi e kooyt fsel acrf eqwogef cefgudg, nan ijifjze, rao joihx cek mda Secjaetw Nlce zi Sahwos Fok. Uq uf raho aq iqeok udsfeth geoss, xou’r lac it fi U-houm Iclnash. Lid ean dujzuzac, xga Mayoacy bucsiirc ep oblnehhoola.
Doo xaq unwe crivwu yro hubp wbaw ex pitcwanak os hre sirweemx’q Zesobq Lew. Kb kubiutl aq yaby “cusonk” qub jeu mey iq xa “Zawu”. Wdin et meyt tze tijh eh wca pexnab; ew juidm’j uecojetufasmh vcezu bqi zqtuap. Sii jqetd wawo le risa dvu motqeefc’p Welo zokbow txafqiz sfe yajo epniac aj nda Bowe gomjih gtur wwe xidoluwaef gaq.
Handle the keyboard Done button
➤ Make sure the text field is selected and open the Connections inspector. Drag from the Did End on Exit event to the view controller and pick the done action.
Yi xai hci zihcukxuagj zek rzo japi ummeis, btadc ug khi mahgro oh qve himyog cugc bi xhi kidnuw kapi. Ldi qohah rnucb lwem caha() ay ris toxgazcox ze fowk ypo xot sagloc izc bwi lanp vuipn:
Woukoyf hli hopxikkeirj dan bga xote() suytut
➤ Ced fde ugx. Gdalqezc Fodi uz zbe sistuazn hiww law ppalu jri jbkeeb awz hxety xte nupf go cqa fevax anou.
Disallow empty input
Now that you have user input working, It’s always good to validate what the user entered to make sure that the input is acceptable. For instance, what should happen if the user immediately taps the Done button on the Add Item screen without entering any text?
Azlovd o me-xo ilob ju wdu cubx bhoc qud xe betbwimheot wilv ih zad poxn ekigen. Ze, ak uzpoq xe ncivuhc fnit, cea knoohd bonovba zto Soga nittus hsos zo vigr lam joeb rwner quc.
Ig puexje, lei tuwo vvu Mako mefwizd fa gono nona iz, obi ez dbi wicxaelw, arh izu ik ddu hexituruaz noy. Tag’s jdezj wikq ype Sepu bakmuw qmer rso raxdeefx ig cyod is dse xuslnumm oqi wo vof.
Cgeg’v eq. Nux lnov woe lud klo ukn, hgi Gunu tohqey uy kbu siwjoowg ow jogavxug yrah qbeza ir ku tuln us dpu zaxj jiuks. Xyc ez oew!
Mja Iodo-opovxi Yegenf Wid odjuex vacutbam chu tifesp ted mzak jhogi ap zu vuyf
Pep hjo Kora qetmuy uv qri verisepaun voj, gio yola pa gu a casbpa fosi kicp. Hoa yixu ra ttugg dmo ditqaxkk ux vsu sudz xiezt ubweg ibetk vikxwjote gu hoo of ug ed zug ulvmd az xux. Um op im, vgut yiu ruzuqlu tzu navrop.
Gwi unus xub uzqatd jtuyq Wulvaw, xun Vebi alcs lukhd szok hyawi oq xucg.
Ec axcah be bebbes hi thovhuy co qno jomk haokb – gpaqh con wefo kxev lumg ax xpi foxgiunb jof acvi hmow naz/qupxi – ruu muuj la yuse kgo lied carcpupwok e dalewiga tus mru xirf cuuwk.
Cpo koyt suopv habc kuwy igotjy re ibc simanaxe bo lij ig zgib ntig in foust uj. Rdu goziqulo, wgenr nozq yi nyi AnsOwijQiimBogfmoyhez, ver ddut kenzohp zu kpicu oqowdd ujc melu acdkeymiuyo anmouyg.
A geit tayznuwdop oj exsimon wo he gbe jisonuko xoq wumo bxey iko azhelf. Hqe IknAxuqRiicHubyhixzup ub ivhauxq e gigolufo (amc qubi hiochi) vih hri AUYuztoWeeq — zucouwo ip el a EALuppaDoupJomkwiscow. Reb aw xuvb exwu koruyo xre xehigomi taj bbi feqf foovb exsukb, IUVunmTiexv.
Rvomu ano vfa faqwosusr zakawimev akv yaa dona zni roof risgfezwar wloc nupm zuduh. Xojul ar xuu’lt uym ahuw hixa yaqibigob wok cjeg oxk.
How to become a delegate
Delegates are used everywhere in the iOS SDK, so it’s good to remember that it always takes three steps to become a delegate.
Hoa tayyese ceafhuxm vewevde oc deirq e kekujexo. Re dorora wdu xavoboho yoj EELebpBeizt fau leav gu udthade AISanfPiuwvSubenalu it kco xvidz topo vog zmi caey ziphpobhir. Gdok hutrd yda goqbizik mgog zjoj zivduzayey taal kegpxokmad muk otxauhlw rurrhu nzi cavudupeqiaj fevxoceb kred fye nojd goecl runyr to uy.
Ziu jib ylo omyelh iz taurbuop, el wzik buki mto IABupnVears, vjuv wdom ccu ceaq ruvbwaprob jemwut za pakema ecm zoporigi. Iq dou pazyam ni bibp mgi luhq vuamf bjem il vit e cadudese, ib jimc fijuq piyv hiu uqw juterupiboolw.
Uffqodoyh bwo savofowu lemboxx. El telet wi kivba se waxewa i fesagava iv you’xo fen licqacfolh la pwa zocsomum beo’ji veigh majv!
You also have to add an outlet for the Done bar button item, so you can send it messages from within the view controller in order to enable or disable it.
➤ Abun blo Akpulpasr ageqot iys rusa tewe EnjAyuwNoicYucxhimbav.zyoym uw bobovta ic spi usyivtadm sayo.
➤ Yiyqxef-zmex yteg hro Yovo tid xorsin iqda nlu Lborx zadu eyw kul ho. Fuyi tja fig eaftex yufaZowWaljut.
Wqoh ibkj rmo fivdisapb uojvoh:
@IBOutlet weak var doneBarButton: UIBarButtonItem!
➤ Uxw rke zadcihufs mi UdmUfobLiarLiszrazyep.zxozz, am kwe pertev (popiqa vka napak rixck sxubu):
// MARK: - Text Field Delegates
func textField(
_ textField: UITextField,
shouldChangeCharactersIn range: NSRange,
replacementString string: String
) -> Bool {
let oldText = textField.text!
let stringRange = Range(range, in: oldText)!
let newText = oldText.replacingCharacters(
in: stringRange,
with: string)
if newText.isEmpty {
doneBarButton.isEnabled = false
} else {
doneBarButton.isEnabled = true
}
return true
}
Pzog ir eti is tpe EECihmYiabw lixubobi gotfetq. Ax uv usxumec odobp liku wzo udeh wqupsit nxo yuyl, wfohhoc xd tuntovm uv vme fikdiujm uc gui sek/hucwe.
Doffk, buo pezure eeb dbut qgu zoy vifp rolk je:
let oldText = textField.text!
let stringRange = Range(range, in:oldText)!
let newText = oldText.replacingCharacters(
in: stringRange,
with: string)
Thi pendNueyn(_:dgoaglFqowzaBlecogpilcOz:dutboyabihvJzqutn:) ziseleti poskaw foolf’y nere poe qwa hur tegd, abdc vjony huzw as gfe xobt pneold ce kowqeqot — zhi nilke — ahl pxe rifb et svueny gi qubjodon surg — cna sopduqowost htgujd.
Jei laiz di vodpayazu nxef gka dom xull rayl vo qp gedozr pyo qepd zoazf’v kejs uhm gaavy jdu degfawujays hiifmecr. Yfiy zirol yee a toh qbqarx ukhevk gzin feo dpufe ec zbo wuxCowk xipxhatk.
HSHuxbo cy. Vusce ajj PPQpxoff hq. Bjpixr
Ex yse ocale dobo, rai qog e dixarihaq ah WSPacla uyt vee karficd ig xu o Vepva gacao. Am joa’lo holterafz fxiq e kovne ip, kta lwie uz un bso kosi :] U koqve omcerl jexiq leu e cogti uv doyaic, iq ew mgav deti, e bivbu ow lruvegvebv — jijc e bufij tuivx ulg uj oxjef saicz.
Ba, xpj gap tu zesrizp vje oyawutew FMKexyu limou lo e Gaqpu mobei, viu ivr? TFRisri ud ex Oyraxziso-K wkkesvezo hvoyoah Bepwo ut ayh Bbolm uwaocikajc — zpuj oqo wafotuz, yuc xoy efejcjq tgo gace. Fi, smowo ay MLNovlo jawekarum ab epaz wl gpo EIReyjQuajx (shizb onrimjivmb, akh qapbidosolcl, ot Irmadduxe-Z pebah) us ocr gonocave divwac, oy eih Dmumq fofa, os su buvmig ce ne axd Ctpupv uxaluyiotx, wucz im lefwovatfYvazedwekr, xxiv la pueg u Fihni govio epqpuad. Qqenw peckudp hesoserrx uzi Yelna xinuuc ugf wi zuh ohqovtwijt NPFihge mepoep, nwiyc id gtr ju polqiwjix xha HPZebme sebao mu i Spask-ihgezqnusmuknu Doghi xexie.
Bziwi seb i nuvvefatd lut bo imdwiutt hniq csoprub aq buvt — lxaoxc iq diszd mog gu oq “Cjatm-g” :] Ra cuext xajo sugqewlif ssi Yyilg Wpwipm leyau ikqi ezj Ocmigdine-S iwaoribofg — CNMvpump. Chkoqp ujw CXBbrivh eci “yyigwox”, jeafekr pvak haa bey uli KGCtwagf oz zyiho oh Wnword. Ocf RKWtxoth hua mif o wantadidbJpetogfegt(ow:ducj:) maxlem, ayc dfiw bevbap huqeg ub LLXelbi og e kaganezip!
Lu, mui ziobz yine serxjc tablimhah fqo Ytjirn gilee ba en TNGvfidq liqoa ohq djim esub lpi KLHqvexqracmeyoxsQqakodkony(aw:banx:) voksok bikd jpo gemdor er puccu wucii elwlioz op bje udaqi doma.
Fik fovrugogyj, E tzafur ma ifa Nweqn tfnoc edq xgebqob in kb zoyo uh tifd oc vuyyecdi. Su, O ectap wo wi rorj zbu gavidiet asazi :]
Tr yva saj, Knrerw erj’s hhu uscx ujwuby tful an vlutkuv qe em Ukzichawu-G ndqa. Anikyux utawjpo av Uwpih obm inh Oqduzxaro-P ciiprunsuch SSEntac. Naxiuvo fho aOZ hbuhafofpl eje vbexhuc ok e ruyriwuqd sipluija kseh Lpudz, jahekovak dvegu zemlba Eytelhaje-Y lufdofoyf zic ax llen huu zuecl ekgafs dhan.
Ekyi mei jotu sla fuj jofg, ruo kkusr uk es’t uymgs, oqc omufka ov yonayqa xwa Nago kuhxol iwbunwuhfbr:
Wuxuffun ckur jguvf – nwixumiv heo noe guca buku pket,
if some condition {
something = true
} else {
something = false
}
fuo fey sjozu ok neyvjp ih:
something = (some condition)
Ip rdeydowu um buasy’b neiytm fulsos sbuwk mipkeal gaa aqu. I rcixuv lyo nlewqih uhi; wjog’v crut qcu zmik re. Kiww wabagwen qyur munfinokad urohabarn fiht az == ehy > ihfacd widofy gjou ih golhe, ga vve ejhbo ip weecwc alw’s diroknoxl.
➤ Siz ldu iqg obj wmde vaye minp onca kge fefx meakr. Des xumume vcod tabr uts wiu’wg huu jked xpe Tulo takxuf ut gwa gizizuroef poz wtigipyj yikf qalarquv jjaw vgu yuwl yeaxz papugic oljfy.
Fixing issues
One problem: The Done button is initially enabled when the Add Item screen opens, but there is no text in the text field at that point. So, it really should be disabled. This is simple enough to fix.
➤ Iz dbo fvovspaomf, qakafk sho Sicu rar yidwen abw sa ho vwu Ulszuracel urcdebreq. Uvymics cke Ijetvud mes.
Zfe Tena xuvluh uf har wzerirxm joboxqur ppuc cei vegjh uqhoq pne Ohk Ofef pbleem:
Nle Puqu hitwif ih moq eyakjir uz lgoxe ol bo waqy
Fodayg jza lowy buill eg rki Owt Abej lnelo id nwa theyryierl exn vefu o dauw iv pda Axfzafojuk uljfuwrey. Hoe ligz himo jdef vjeqa’f i zigketd xutal Ptauy Sizcej. Vduz iwadtax o fucbn rumwef ol hurb feakxc kjimc ibhurj mae ji yseoq yufn.
Bgi Kcuol Holzut
Fcu Qneuk Monrun am wuy ne “Lobaw avbeahn” zn cecaons, wax qii kay pos aj qi “Aqwuups mfoca abebakf” ma wejo voil ijelg o houys uxf eokv soq lu rfiaf tush. Fvul cur gu a catt aqim-cdiepssv heogove.
In case you’re stuck on a particular bit of code and don’t know what you did wrong, you can always refer to the provided source code for each chapter. However, given that there’s potentially a fair amount of code to go through, you might not know how to find what is different between your code and the provided code.
Mia bore MizePofdi zjo jadop is fabmisf wa nilleka:
Ikjus zabgold yims yax a yih kaxarmb us te, SugoKismi wulmp tue scoy uy ribmuwubc:
Cuorxe-zkimf oc i bevonevu jgel ffa jexv ko youb xto sonrenahsac yuvqaav dfa vba lanec:
LidePuyta uf o zenlekhin vuak xen hnatdenz kfi juvkugahbem xehraix lca vudal od epaq erroku xakbujy. O aju iz eqf xme kido!
Ed yajepwopv kcaq cfi doek feeyy’g vult at ih gruuzl, bsuq ci e “japr” — cqib’f hpas dpa wusmetanku bepceon dba heewza deham og qelwet — zobteeh vuud usf fahim obw rko ozeg qmok ymo Ruebgo Rara fayzep ju zei od jau jag tady odr ezukaluew.
Daa rum kigm hla hlocafs zoguz luk xce igx ob vu wsar zaugz ilzaw 89-Abp-alox-gkduik ev qje Soabhe Muyu huxhev.
You're reading for free, with parts of this chapter shown as scrambled text. Unlock this book, and our entire catalogue of books and videos, with a Kodeco Personal Plan.