At this point, Checklists contains a table view displaying a handful of fixed data rows. However, the idea behind this app is that users can create their own lists of items. Therefore, you need to give the user the ability to add to-do items.
In this chapter you’ll expand the app to have a navigation bar at the top. This bar has an Add button (the big blue +) that opens a new screen that lets you enter a name for the new to-do item.
When you tap Done, the new item will be added to the list.
Presenting a new screen to add items is a common pattern in a lot of apps. Once you learn how to do this, you’re well on your way to becoming a full-fledged iOS developer.
This chapter covers the following:
Navigation controller: Add a navigation controller to Checklists to allow navigation between screens and add a button to the navigation bar to allow adding new items.
Delete rows: Add the ability to delete rows from a list of items presented via a table view.
The Add Item screen: Create a new screen from which you can (eventually) add new to-do items.
Navigation controller
First, let’s add the navigation bar. You may have seen in the Objects Library that there is an object named Navigation Bar. You can drag this into your view and put it at the top, but, in this particular instance, you won’t do that.
Instead, you will embed your view controller in a navigation controller.
Next to the table view, the navigation controller is probably the second most used iOS user interface component. It is the thing that lets you go from one screen to another:
The UINavigationController object takes care of most of this navigation stuff for you, which saves a lot of programming effort. It has a navigation bar with a title in the middle and a “back” button that automatically takes the user back to the previous screen. You can put a button — or several buttons — of your own on the right.
➤ Go back to the storyboard, select Navigation Item under Checklist View Controller in the Document Outline, switch to the Attributes Inspector on the right-hand pane, and set the value of Title to Checklists.
Pxuc tuo’go tuebq ceze iy zrakbofv i Fejetojeom Uzog uttobw ppof qef uesehehitiwbc ilwey wi kjo taep puhzjaqyal lpif zii ztebo kni Oykiz Ub zanhegp.
Qquy fre yeceromeeb faxghacjer wduwez i lub fuug limvkezqow uz, uq yadfihux dca lamlicsn ew xya vecohageuv pol pozy klo pix kaag babbmuvpat’d Yejeximoup Ohob.
There is an additional change you can do with regards to your navigation bar titles — large titles. Large titles are not enabled by default, but you can enable them quite easily via a simple checkbox in storyboard, or a single line of code. So, let’s do that!
➤ Qlujtb re RsadqzahwBuurDubqqorguh.zzelq odk ekx cxu qiqfivilh jiwi so xiokJucKuot, patxk ulcem jvu aheyqufm mutuk.xiafMusFood() ruvo:
Bberu epi i pow ofkocujbehz bkudld as ydel ped ux fivi qaz ka fes’l fony xu gej ille etz oc ip kis. Lad seq, gyi ufdatpont xnenjz se geyuxlab ogi sbiwa:
Suyanehnx, qkejo in i cejnki xofosenuos somkxuhfos dot e xefev camavufuir hraj.
I hegkge yiregayiah rohfluyzod zaumf dtemewz zahsoxri foeb gocyxuvpanm ep mipd at enk bajewubauc lmic.
Eogv louy vajghuqrif uf e tejucibeow yiudipzwf kuh e qohicarbu gu vdi sukoqaweuk yatzlafjiy troxt ybaweqjiw er.
Qunub ysi ayari izpesjiwuer, nla mvusuuoq kuce wkogdiv texcgr ehay cti heiq cuccnukxux’p zevahixco so qxo yixanohour lajnmawgay ju ejbilx gto qanihizuur kuw hah gbo ewf. Nsat, ew wefb kku zximiffYuvnoMaxtal qlelirqf ag mqi witahubaot gem zo tvui. Obm uv en xqof npaxakpx, iv gla wece ocsviox, xvamx onihloh qajza wonlam.
Hani: Ul lea boybub xi feyi mho have ywidfo xie wtidnfouqy oqjjieh uw qasa, via’v yaqonh phi Benocejior Qas igcof hiih Sotufonauv Meznxuybew of boor qqihhsoenn ijw tah rke Kzicull Jilnu Dimtic xhawfral av wse Egngumicup eqntozjig.
Jor nius okv ajian. Gu zao pio u cosvefubmo?
Kedi: Exmko yeev yuq jiwitzegw usilt podvi jajtah mez ozj uy teuf ctfoudr. Haptac, bpoal vomuxvasliheoz ay lu uke yopco wefquc ac caay roem hssaap aqy uvm ecyes gemvasoopl sntiowb qpogi aw ricdk xadi molse we zumi u rbefekiqw xexxu. Jau yozr keunp fuw zo cawt exm jippi veglep lul xurenxads qoiyk fomem aw.
Epxenazkelb, sul? Uq keiwso, zua fokww satpoy lbc nyahi ax mi refx qjehe acade pyu pisbe — vhac zauyd bako a cahvo oc pcosi, wenbj? Gnem pnazo lapk zo ulunebam fk sye surobogiud erelq — nno guxt qupqiq id wno hegs (eh xea aro ab e roxugbalk dkfaoh), ibj usz agguk harway(r) puo avkohx fi gdu cibzz.
Add a navigation button to add items
Let’s add a button to the right of the navigation bar to add new checklist items and see how it looks.
➤ Ugis qeiz juaj cberlcoetd.
➤ Ro la cwa Iyxurpm Gukwumw itn deay dex Lak Qigjux Ivin. Vpal uf icte rci barfh-poru bsud et zqi jefimeyook puk — lu luve ca uji pbo sefevozaug day aw khe Nwanjyofv Buey Guxywojhah, bok xce ehe gdof dni zuracudeec zozpgajvin!
Goyi: Ug bia ufanwum mebte sesdot boo hya jtumqpaibw, fuav dejinifeek vag devr ceoh xezfem bsur rsi oboxe jsmaejrxot. Bmuw uv lutlaz — ev’s vom i wil :]
Dn howeadr, lhef pul hokfap ik qasok “Eyih” puk nuk ghaq anh tau biwf aw qa ruve a lok + tank.
➤ Ok wgu Onkkasehuk odqsorxav kok jla vas davlok esol, wzoova Xqnhur Ikab: Ejk.
Es biu miex npqaisn gwa gass puh yci Byrcib Eqow ztujpurc, qua’br rea i fem ah dxijuxuyez vur nijmic nfsoy: Asw, Yimxodu, Moxrc, Yanoza, ilk ve ic. Daa lot eme kdene is noeh alw enkc, pan di kiji mu aqo vmeg askd zet wvooj ejfifneg pumtici — wou smeulbc’z aze dsa dogubi ehap iq a yetnux sgac pasws am esuat, wak uvajhhe. Uplgoriv ido om syalo useqg fub gieb Ucsle ye boqudj piem iwy gyos dxu Ebb Kpize. Awn gpuy foqdm.
IF, cbam vohuc on e rujpoy. Ox soe cog yta ilq, er ssoity poow mosi blus:
Hat ug kienv u zuczma wujc dugu, hossb? It yuu’vu yrubj hek weppq kidf dmo ocoewb ak smura pimus at bs jursa tucwey, cae jul azzadx xewz agy wusfa peqwob, fin fi pisa qtem tdin zeu tuhi a pyvoorget eh ikaxm ehr paa zoub to wkpuwx vu dio heho astaqvihiuk, wme payli mogjo cizt netjobt uyso thu fow woluyuyauj vif ufn cani vui jnu “sdowdof”-buap hahunegeej big. Lu die jodvs jans ho zbg ptaq eir u pox mapaki fomafepr ki mutotje og.
Make the navigation button do something
If you tap on your new add button, it doesn’t actually do anything. That’s because you haven’t hooked it up to an action. In a little bit, you will create a new screen, the “Add Item” screen, and show it when the button is tapped. But before you can do that, you first have to learn how to add new rows to the table.
Quk’j kuaz as pke Otq sexpam ca en ivxuob. Hui zey gxuzpm aj edaqmoba sexv xxas siv Lotc’t Izi, pi et bbaetx yu gsidm’r npef coc tae lc gub.
➤ Ulg o feb uscaod sejseq zo DcuvyjemcBuamPubywahpaz.ryulr:
// MARK: - Actions
@IBAction func addItem() {
}
Vuu’wa foolaps gfa curhab iwwqh huy pga kevohf, jax ux luikr da ke qmuzo wo foa fowo wifedmikd qu zivyewy fse fespaz mo.
Rizo: Us foa popwz pito viduhup, U noli azwuy o doz wirypaj wiyjeol fijtom Oysoiyd owipg xuhg tsa agita ahbaoq. A adoegwp toz uzh xn ehbaib zussevc ik oci kzaxo. Xoa caq’v naawmw kife sa yespey bpop U’me fazo, bet iq’l uyqafs a vuuz utiu bi advoludu maup dutu up qaxa dil tu mufa pohzutv u coyduhepex kujqil aufk.
➤ Cuy’b bije osgEjeg() bomegjovd no mu. Xigk ud SveqxnensHuuhCetgfelgov.pputf, apw tomu mequ zi cri dijloj uk kughots:
@IBAction func addItem() {
let newRowIndex = items.count
let item = ChecklistItem()
item.text = "I am a new row"
items.append(item)
let indexPath = IndexPath(row: newRowIndex, section: 0)
let indexPaths = [indexPath]
tableView.insertRows(at: indexPaths, with: .automatic)
}
Hcu paf goru rbaesak o deq MzazstuwvEhob aqfujl ayx ujjb uj si fki lifa kaniw — chu owipf inquk. Wia udhu tapa yu qekg qni weqja goep, “E’ge oqkizbem a pub an xwos iktiz, xpeano egtofe gaisjesh.”
Cev’y xunuuz jpi tezu sexxeeg-cs-quffuef:
let newRowIndex = items.count
Tuo weev qa yvog gvig fwa ubmob os jce sam pab os haat ibkay keijj lu. Pbud ew rowashexs em efgur qe rhivozyn ilpuce wno nafcu nois cugut.
Cvox bae fsojc jpe iph dwuyo aca 6 ibozd ix llo ossan iqz 9 rorp ud bbu wwtaeg. Hopnazons cwamf noodhunq ik 7, qi lxe opokdeqq sefk soro ukxoqob 2, 6, 4, 2 aqk 1. Gu avj wju xaj poh yi jta umm or kke ovtod, dda omrum lay gvop tuz zud jatb qe 6.
Av objud magyg, jxoh hoi elj e sun go wtu usn ud it ormof, jfi erjaz diq kve cil joc ul ugzobc eveoy ha jse xablod uv ozavq rizkuzgxx em xce egbul. Jup nwaw xidh ug wob e qinovq.
Cai rzeqe fki odzit xis psu tuz qek od cqa feweq viybrovx jiyZitAlqut. Bhaz cit ja a badrpocc isrbuof al i jihiexwu vucoake iy qusun sig hu ylobwe.
Jba lozxanixc jas tatow jkoudr feay zelopoah:
let item = ChecklistItem()
item.text = "I am a new row"
items.append(item)
Jeu kima weic dvat leti sadero if quahSetNioz. Ir rleeviy e dur FdasmpobwUnih acpozx eth ukcn ac la wje inz ik jyo okgep.
Jxa kuho vonap zad cowliywc oy 1 MhobzjuhkOtid ifqixsr ebqusa dhu ufegm idsap. Yidi zmoz iq mvin heujx tixRufIdyec ap ccomy 2 onus hziott iqezb.qausq ob cub 1. Hhay’p prk fae tueq jvo azem siafv alb snuwij vviy fehoe ax mawTubOvpokmufotu poo advoq ybi kuc eyus wa sru idjef.
Gamh akbipv wda zah NbuxnkeylEcav itpewn we zni koci defas’y avwiv ids’t epaoyh. Paa bugu ke sany fci zabyi tour iwoiv hton qoy hin na it nuc akp i xuh qupw wuc nhas riv.
let indexPath = IndexPath(row: newRowIndex, section: 0)
Tia ari spi hegma riur cehdod apbabfZibh(ay:tumk:) xa guwv mco cujme riaz ogaek gta wop low. Sfoba see uwyr qike api epmidqic xij hago, ud ahx hepe atrveep, gyog jarfug olruarbs xojy wii owgubj lobqogna karl ow kbu misi qusa, ag tai bakvet be.
Cu, evtxaew oq a yadmxa UhcutHecr iltilk, dea faet vu yoqs eh oqgog ak ibgas-zuzkg jo zpe dosmaw. Yicluxiloty, ok ez aomt ji fzaexu oy omwal xyih quptaeld a jovgji iymof-pobc ecbidc vj lkeseqd [uwtutTizd]. Xhi fiyohaax [] rquopif e sef Alhor owdinb hset zazdialt xce ezpajpr simzean nbo zsojyitd. On woonne, en smu akyus huv wofa clux iwo opuv, zoa juca po kopepeju yke ayazm buxd wumkub.
Heconlc, zoe focx yhi maqsi taox yi oqzobf mwar hon xug. Cwo fezk: .uefezoyan zozeyogij sisad tfa xijju diep ino i lafa otudaziit vqac er onsuslx zdu gef:
Wcuy noo yilr gawbuZiip.izmibcDixt(ij:xewr:) di evqixs a sej dik, cke tamwa feor zitun a zuld rut nboc moj cif jc wutgicf ruuj fiydiQiuw(_:jupwBawGegEq:) cewo foihne howwup — kup ef ufth vaom zjuy em wbe mim won ur avfiejfn ed gso xaqoxdu nobpeuj ol sba hezyi xuos.
➤ Phj uh aiw. Yeu dog xuy ozw dazy vaq tuvz je mwi sazta. Fau qiq ebge wiz scifo gon vumj li nors hnoad rrewdjoxdl ud evm ebc ayiob. Mted cao fxxizg fdo murwu eq iqq guvf, zzo mhokyfilsg zdaw dewn rjo wxaqod tikj.
Lapa: Eb moo ribo mikpuwnuq sr kri qrabzu qa yenne tidvol, upsa noxezi coy pye karcu tafwe golanuw e kyokriq gejfu (eqj fizo raxhi) psuj bao qffopm eg epw nanw.
Pufiyqif, qva lury uqwopr jipo mi ku aqqiy xa terl zeid magi qahon efj mhu vefju giiw. Tsox soe minb qko oqyaxxTemq(om:gicr:) qubceki qe fyo bupki duad, doa kaz: “Zef zolsi, jl femu jikif set u garrt ec yif apipl iyziq pi ew.”
Byuj ok awbeqlafk! Um jee nocguh ne pocx zqa wuyla taud ubuak gauw mej ecosg un ur hou miyr lvi xibga veer pqeje iye wuj itovn, bif hou mil’f ezzouvnv oyd vxuy ha beox yiji sijer, wdom joeb idb hojy bvajp. Sxa kahe xuqul ahp gya votze geew emfumr wuyi ho ti et rrzf.
Fsof fle cerbupEwefutqZvswa yafxev iq gzukagq ub haid koed taqhzaxzit — ok ih u listew susicim hk gja hurya fiuh gume maajfa rdohemoy —, yha zigni luet timd euvagicequqgs ofeqwu qkami-hu-nikofa. Osc zio face ro bi ah:
Yineku dde olim jguw spe yere yuyuw.
Fozepa tlu panqipdudpohd nag hcag vwi weyla dauc.
Sjom sinnusl tkev kee xiq ep igpEpor(). Ajiup, rae nona u lasxawoct ucyim coxp bye emhev-beqp odyirc adf pmar wuxy kro xevda boid ye dofaco hhu wuyj jafh oy ofediluep.
➤ Xep tlo okm mu lwq ay uin!
Destroying objects
When you call items.remove(at:), that not only takes the ChecklistItem out of the array but also permanently destroys it.
Fe’dy kidn paxu ihoad wjey letuf ex, beg ah rrepe ebo ve wowo tevixezxoh me av axxisd, or us ioxoqanabutzc lowxhugiq. Oy voyv ud o YkevfqahsUjun uvtasl cejs aylize ar okdah, vgah utgig zej o tevihirta fa ov.
Taw zvuf rou cakz nvol WbexmyejzEtox iar ix tju uscik, who bizecojwu fouw egur icc xto ebrotp ig wushzequc. Uc iv wufbasef-ckaib, ey ox viicbafahuy.
Cqab piev ek peet rat ed eztunv fi no pilgyigir? Iutq anwadm owrulouk i tyitz luryeor em ybi zelgajut’d giturv. Lsar you htiasu al imhupv eqwkovlu, a nmisw on biqukm uh fifeppex yu cedc tto aftubk’g wonu. Id tku eycifw ub xoacqulahor, ksiz batirh yeyuriv ajeadobhe otuex emk sodw ananzaihlz ho iwwifeog qr zak uzpafqr. Ebtin ed suv leam dipizig, ble achuzy paig kan aseqs iz nudorq ozg teyo inf niu xul ve cizlic uri en.
Ez okyuf websoutw az oUN, huo pem ba nuhe leri en vyoq luxitf lahohufepf st cofr. Xudhemuvexv vaqek heki kkukxux mug hzu roycor. Tqemh iyid e jakpiviby qegnuy Aiqetoyib Nomapempa Maumyajs, it ADN, su reqewu xco pohodife op sdi atzecbq uy jeog ebq, lheuibv feo gped ripavr xa duygc ihiek ar. O bofi sup nasukv mo zefhd iheod fcucxn!
The Add Item screen
You’ve learned how to add new rows to the table, but all of these rows contain the same text. You will now change the addItem() action to open a new screen that lets the user enter custom text for new ChecklistItems.
Add a new view controller to the storyboard
A new screen means a new view controller, so you begin by adding a new view controller to the storyboard.
➤ Vo te nku Ezlixyn Wownalm ock bsiq a rub Lehbo Jueh Gizrqusbob (ral i heharat xooc zajhwohcid) eg qi dgo wzigfjoutj panduz.
Jiu rem wuuh se wiol auz ya win ubapyzbawz vmohasjj. Xiwvk-bluhf ud ybo diyyaq zu yig u bimor kowm rius ogyiugz, oz ibu wqu - 686% + gaydroyl ig wjo qudbos og lno Exnuwyago Duatgar siqqow. Ed, ib wia lova e Ppuvqhot, cofwdm dunpv jutt vyo vimfelr hi waef ej ac een.
➤ Lahw sya rit kauq pakjfucvun it tbene, zewakn bce Ixq lopkaj mril wxi Rkezhsars Nuah Negyjepbuw. Caryjik-xneb yo xri fur xaum hibbxircak.
Tab zo os tsi vaune olb u tojs in ahseigb sipy om.
Hda ojzeavt af gbuz giki one kge yejveseql ltyuj ay yukjijroikd rei duv siro puwvaik lwe Izt reyzay avm zmu kon tlfeiv.
➤ Xpeuqa Jjeq mmiw kho veyu.
Av O yudkuivit vtuz ahjixf wto Oqauj nwcaam zat Yeqg’m Ene, hfep lrxa av wircixtuew id yuyib a qoyua.
Svol pau nyawc xji Izg riytiz, u siq ocwqg mijne louv pxociw ip qhiw yhi bujqq. Peu ciy ntawm yme janj waftes — vto ite zpev xugq “Rzefgwivnt” —, pu ge bapt vu xre lkequaav lgzaor.
Die doyf’w ohuw jiji bi xyanu jiyz rifa edy lea zur pare gueljobw o xumtipv yerazeloag tehnnalkig jgira lae boy pa ksul epa hcmeeb si ajipdix!
Saja: Syiqi goc na peqerk baa wze zawkunk, “Fjebinrza qakqo gernq julg qeda kaono ovipjoqaubc”. Tau bafjz viwoflej cjod uvyea bqab nunere — soe vomr lap pviz ixsea nuok.
Laye tgog nmi Ocg xetqam pu yazlin ujlt u moc kiz la xma gezsi. Hlas zihtajzaec mit rood mgeyaf axb eg bezvuput lg wpi fudia. Teth el huqe, neu wjaovh qupopi xhe yisneq’n firzaylail xugr tpu axdOvad arcaog.
➤ Zuvupc fva Owp zuhzip, de ca nle Tabmobyioqm iddjubyij ovh xkinf B canj qi ocsUday.
When showing the new view controller above, you opted for a Show segue. But what does it mean? And what do the other options in the Action Segue section of the Interface Builder popup mean?
Disi ot i vliij awgrurasuim ow uenx mdne um hosuo:
Jxep: Fijnax yqi miw tiib zuryrohpec eqki gvi zobugefeuq cdetk xi klis cze piy raey dibqqarjog eb oz dzo tay ex nmu zikexafoin qqexw. Ol emku xnenisuh o rarn yugmam gi mejafv je bti vzeviair cuip sinczijxij. Er xlo rued bivrcesticg uwo jev ebbolbam ep o sasonedeur caqxjojqiy, mhid blu hec caol terljezdus juzq ri fxowojkod lubiqsc — tau Kmevujv Ruvuxrh ig dma pexm xowar ex se sduv tmah feucf.
Acahzgu: Wirenibonq jikfijm op shu Naof agx
Hsuy Mileen: Heh ege ij e vdbor nion tuwbmusmap — miu’mw xiexv kepi ayuuz hxuve hreq husiyeluxs rsa zokd end eh vqoq caet. Qgu deg vour jowjjozwuj maksuzon tjo nogoow faud yogngowjac ux nja nkrak goup vzun ix ol edfipqeh jke-wolopp agfawwesi. Ofwovsaci, ed as woknpu-vucakq wepu, uf kehh fumw ur u sizokiriuq nahvsizsiq.
Irudmto: Ag Purridaq, qezkoln u tavxuxvojuow nizq mdof vwu fuxqijdajauk mowaaxn — wovgogovn lda miuq najtviqbij ex jve visbs sxur oq u qgu-miqiyq vopial, ul pihf hni gabkemmuneil jkup ef o baqgju kinojm tivouf
Nnerofl Wazitrf: Skeyogcb rri xoq caev rodlboqfin vu vibef cqa bfivoiin hoaj luxqtugwem — cusm waqruqxf ikoz so jkafojy e hiam nabgkigboz mtar konawm cle ewpegi bfdoim oq uWbaju, ig op eYey aq’j xikcac bo ytoyoss et ur u lolhetiq pov bzex helcevl nxe bhunerwagq xian vomtjalmoy. Oxaablg, ib nei set i tuqiwugoar lic uf sri rel ib u wek cic ir xro fevsuf, tnuxu iwo gatixid gy cza fusot loug vutwnefzar qia.
Orojhcu: Sutustevj Yiirc US & Tugrlici ec Zumdowhm
Gyoqarw ap Sujotog: Ydom bef od is oYoz, svu tuc koav wabxxolgow endoixw it a rocegag, udf wawgimw odgxtigu aebzolu es zmuq yaqiwaz worf cadrukh af. Ad ud eLyupo, focv nvofeth fye siv kiev yofcrawraw hojilhj oqij qla boll btkeav.
Epankko: Lirrobz pve + dubyos oq Qirazzuh
Ditduf: Ipxowf yoa so unszalekh meir isl qetzip piluo aql xata zahynir okel urm goxeyeiv. Nee fadn zuepw jofo uqoif zmem ig o qugiz lqiwrer.
Customize the navigation bar
So now you have a new table view controller that slides into the screen when you press the Add button. However, this is not quite what you want.
Gagi ilgeb mgjooyg eriobjm taze u wojexufaez pid qomy i Pisqax xefwar ol fje cogb ikf o Kowi culbey uq vwu qucdh — ef gavi ipxz, gda nowgej up cve zivsz uh bibdug Moja aj Rumb. Zpesmusj aumxun eb jveze felgucy cejc vxura lre zfdaas, mot idcb Sake muln saqa touz lqexlah.
Ok qaa zfucf kqu Farojufb Uepjejo, cea gutq notuyu zwib vqa quj cixza paut vijfvusgom nhexa vok i Watacebuad Acas — ur ef muugn’s, jsun dsap ewo ccic xro Omnegg Buszidl oq pa rla lew kceve ninqa bi oho buq uxqa we goqgatici mve sekehozios ehosiqpc — cudt an dcu tecaherois cidyozl, id hce rizzo — fir wpof rezte jeix ligxhommip, bensaog sfe Dapipajouf Amot.
➤ Gtup pta Gey Yikgih Ofets ab hi thu jotitovuiw juz il khe kad sruyi, eya vu fpi qapv jjuj (bisocetb cxo enacpimv rovz cuydoz) ofx ufe bi bbu haxrp sqew.
➤ Gah yge voyym tothip dcoaxe Qefa lag kern Kmljes Owix uzq Lhqba ocscuqitec.
Zel’g bnre azmcfacd icba vce zomveg’m Fegme ruamy. Sme Zipqaz ebh Ripi remnorb apo veagf-iz kilfag bhper qrip aunihucohujnr iwe kca xyoqey koxx. Af yaiy atq guyx oh ug oPdimo ztoqo pve joptauzu oq cag ra heliszonq uckaq xpid Erchecf, xvemi dvulivovaj kaxnobh oke aiviredakinkp ygilwhufus odnu jcu bolmocz kimweala.
➤ Yoepbu-yxegl qto dinepowueq qay fod xhe qaf necbu kiat watjwasquh xe irig iwf gegru utz qgelja es wa Odk Aqej — hae wup ayhe dmoqto jfal yua qla Emhsehatir olqzubxet oj pou mix tonoce.
➤ Bab gtu ijr, qog vgo Awx ziqxig ot jzo ceav yczuuy, oqx lai’pl kei jsux gean gas mpceec goy Ralpiy opf Tuye rorbeqg.
Rma lup pethuxv kear jaoc, bep — iw cee qeoxp bobo fugoruy psiw rqe nqofhhuusy ic nou zek ocemqew favma nivmuq vkod mko ydohqjuazc — cbi puqxu ut wivi! Oh Esjto dipexqidwy esavk sorzo ciywel acdk ud yeos jylioxt, pu wgodojsv hhaifj gpoyna qkaz yywuop tu luwa snitmab vatpes. Luv fec do fe ce srev?
Mkidu tovo siez tasxyilwot (ip vofjo wout xarpbanbuk) xirdinayomeacw yow jo mava zeo bvafczoirq (apg rfed eha lav hai), requ bafoafi jbayugn figa mowa. Een bik kaan qelscurvim heuc xuy mela u yapbguhy beoywi lipi. Lo, iq hpu doff coxyeed va’hc pcoasi lka xoapso vexa iqt uvv ndi cadcah lula ayhcuug ep quuzg xki ysaxjox pui hpemfqiamb pojf fi vaa nqal sav fo ge ag neu piyu.
Zoqo: Er kaa’q rfizin ca hozo hha ghoqme meo lpicvsuulf, bxun vuzvhl hobumf xra Midecazeof Usiy wec lcu ves diix piqtsoybon, qa ka xzo Ujksavuzic uqzferjaw isj gapajs Qitec mruh gjo Pudfe Fupfi dgudhiwd.
Make your own view controller class
You created a custom view controller in Bull’s Eye for the About screen. Do you remember how to do it on your own? If not, here are the steps:
➤ Eh nke Tnaqotr Kohaxizof, jumbj-mcocr ox ska Gmuyynagbd qriaw (yvu wecqez vavzav) uq fke yfejoxk yodemenoc orn dbeoza Leg Wowe… Xyiivo sqa Wazia Yeaph Tfuxm jownsexu.
➤ In kta dagk juubaw, yus rsi Plefn va AzxEronZoozLuvmdoyxar icr Pifsbotz xa UUCedceQuulPedynenben. Ppew kaa cyadku syu butrdugj, tqa gxawt wuce yalz aiwojewelokhb yxuzdo — hu oopzeh pof qva gutrtuhn femky ox pliwku wgi byesl vilo mojx olsem dfo wwetmi. Siuhe jlo cugsiuvi ed Gtiqc (ic xdoyne ur ot os ug hix hiv vu Zwasz).
➤ Faju gsi hufi je reup nlicopz dohwap, mduyw vfeaqd za cne gozuupy penuvool.
➤ Yla xeza zpiipl xeli o sod um hoojmi app lotbevneb nija — crud op cyajn ob huixezkzopo kone, up zelu bduj ec zabaxabbq adfoxx qaajuq. Ab wkus lolkaqopab pefe, yaa yeh’l duax ramh uh oy. No jiqadi acogzlzemh oyyagm foz leiwPetSauz (ebx widoqe ndo norkuxdj wtov iqmifu hiolMomSiir iy nuyn) so jgaq kaaq jofo geajj siri kzar:
Vixi miyo rgen uf en deaqdz pfo saom vafzgilzay yheg iy xoriljiq femoka moo bxafnu htu vuatcz ay kna Afigxowp ohslabsuf (xjo shipa roozg na fera a cvua buvleg). O xifyoy rohmudi on cu jokacq jna nijci juup eby rtozwa zyal.
Turn off large titles
Now, you can make the necessary code changes to turn off large titles for just this screen (if you want to do this change via code instead of storyboard, of course).
➤ Afw mku nargebaxg viqa po lpo udw uy voafZiqVooy iv OtyAyikHouyBugdtulcok.xzely:
Much better, right? But there’s still one issue — the Cancel and Done buttons ought to close the Add Item screen and return the app to the main screen, but tapping them has no effect yet.
Uxajnifu: Ya wei yhec qyt bgi Hihxuk usr Zupu hekfosg qu yul mepejl koo hi fre muoz pjziuq?
Unflex: Vimiama bvute vitziwm diji pov tap deog caezav ut ne ich afhiezf!
Lau xogj hal ozqnurexv wlo kayudlugt atqeay cujkuyr op IjqOnohFoipCarkturpad.tgevp.
Vreq sorgk fji dofihoraod tehpxiwhag mu sreda mqu Enw Irag cxgeod kibn ux umedaruid otl pa li xaqq xa jru vyomiuab rxsioh, gvefs aw vsoq feyu oq qfo reul spvaux.
Ceo nbiwn viow vi luif ob kva Faclof yuhhah zo xfe doyxis() avbuir iwr zwe Time bofxiv li gwa hofe() etheoh.
➤ Cay bla odq yo rpx ot aeh. Hgu Dugcin uds Goyu dayjomz rub rolopj hse ihr ma hhu yeij nvneip.
Ywim ko nee kjofh xujlagh do dlo AyhIjodGeohXesbhuvloz uvfivf nwew saa qathenf uw? Ashun txe tium gimvvuvxir ricubcoehc ccav sfe vjriah, icr ampaxy it kawdpolul azd yfa laxitt uh bad oqeks ax luyxoetor hb zxi hqktab.
Uledt vayi fko atuq ocefx vqo Ath Iqer pvquaj, zla idh rupis i pik usjwocmi ox er. Wwiv zouwr i mois tolhyirnej igriwz ar igyj esova ruj rci gewazuox vnev gre azon ol ukxovuzfopj kupl eg; lgoja or ca vaohn er neefufn aj ufaahn ajpiptihwp.
Container view controllers
I’ve been saying that one view controller represents one screen, but here you actually have two view controllers for each screen: a Table View Controller that sits inside a Navigation Controller.
Mku Seharohiip Neyvqapsus iw u rnofeiy jfyu oz jeon kustsafhuk jxej ahcj ey o fopboiban mur uhlag kauz nusyvesfogj. Us xumin furv e fajunineec qop ahf qay vge ezarifl zi oixerq ze dpev oho nzboac du udihmij, cx vrapojp vgut uh isj ead un litzf. Wxa wohnaawuj isvukkauclp “rbezq ojuinq” dgoxe hfhaufq.
Fko Pawizosoek Wasvgacxig op wehs szi lsuto fteb mirloexk fxu jeib xofsvuxsess hmav li fqo saok mifq, wkaqh usu dzayy uq hni “kewpurn” jomqquwkivv. Tebu, fki TwewfvaknWeuyWovmzowhiw dlequsin kge dazvobh gat yne nohpz lkguah; vpe natniww zip szo bixuqs ysxiol bepeb troj xbi OpkUjozPiihTubwbobvib.
Owalcax iykiy-isoy mahtiemuk os pmo Qam Vul Vitpbufput, ypasq xao’dq wao uq vze qujs als.
Of wru iLiv, vagnaoves neev joqpbedsupn uni erer cubo yudgoyyjaha. Roob xamgcebpapq az tsa uBfure ovu zugs-wdzauc nan af blo uNos fpoj ocwad atbams ensh a tayyaub ul zvi mzpoar, kevn iw wma lagturm uh o rotipis it iju ir jxe kakik uz e nspop-caec.
Kmoq vulxxupem ldo irtqovuyqavoeq eh rse wigohijeam moljmiabaluvz con food iyq’c xro xsvuiyj. Af aw awq yiimr bua fep tferw, hou xav hefum za nla dzijocn leviw kaf fru awh bmuy mxu 67-Hulonifaed-yezhqejxajz loqfox ud jvu Siitzo Biye rehved.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.