In the last chapter, you designed the movie edit window. The user interface elements are in place, and you’ve configured all the Auto Layout constraints.
Now, you have to display the data and allow the users to edit it. You’ve already created the main table and populated it using a data source and delegate. And you’ve filled in text fields by allocating them an @IBOutlet name that you can access in code. In this chapter, you’ll use Cocoa Bindings to handle all the data flow with almost no code.
Then, you’ll compare the two methods of working with AppKit data and see when each one is the better option.
As usual, open Xcode with your project from the end of the last chapter, or you can use the starter project from the downloaded materials.
Binding the Title Field
When showing the movie details in ViewController, you set up an @IBOutlet for each field and manually inserted the matching properties into each one.
This time, you’ll do it a different way; you’ll use Cocoa Bindings. In the SwiftUI app, you connected data directly to interface elements and used two-way bindings for controls that could change the data. Cocoa Bindings is an older technology, but it has a similar effect. The main difference is that you configure it all in the storyboard, not in code.
Start with the title. Open Main.storyboard, locate the Edit View Controller Scene and select the top edit text field — the one for the movie title. The Bindings inspector doesn’t have a keyboard shortcut by default, so click the inspector icon that looks like links in a chain. Expand the Value section at the top.
Check Bind to and select Edit View Controller from the popup.
Enter self.movie.title in the Model Key Path field:
Binding the title field.
The first of these settings tells the field to gets its value from Edit View Controller. The second tells it what property to use. In this field, self refers to the view controller, then you get its movie property and finally, the movie’s title property.
Note: Xcode always shows a gray exclamation mark beside the binding path. You only need to worry if it shows a red error marker.
You’ve bound one field, so that’s enough for a test. But you need to make one change to the data first.
Open EditViewController.swift and replace var movie: Movie? with
@objc dynamic var movie: Movie?
Cocoa Bindings use Objective-C so, like with the table sorting, you add the @objc attribute to make the property accessible to the Objective-C libraries. The dynamic attribute is essential for Key-Value Observing, which is the pattern used by Cocoa Bindings. You set up a key for the field, and Objective-C observes that key and handles any changes to its value.
Now run the app, select a movie, right-click and select Edit Movie…. The movie title appears in the edit field:
Editing the title.
Now for the cool part. Change the title and click Save Changes. The Edit window closes and your new title appears in the table and in the movie details:
Edited title.
How’s that for a no-code solution? And when you quit and restart the app, your edit is still there.
Adding More Bindings
Next, you’ll set up bindings for the other text entry fields, so open Main.storyboard again.
Lumicx pno jeikm micofe yfi Qir zajo qayid uwb ijos wpa Cuqdeyxp onmguxwis. Owhavq yri Nutui feydieg ib yra buy ak ir ogw’k evlaugr ufmomkod.
Nvobl Cunm ci akg runucd Iwuj Xeek Hamkdetsih dham xqe jelax.
Uynep zajh.kiwou.nobQeta or xko Gerev Biy Dodb biuzp.
Zixiec ccaq fif gpe Meut, Yocarbs udt Qizvut juotrp. Wek euwp ise, kbaqz Guxg ye azj gavivn Ixok Feiq Jagwturnem. Fepo ribi doe nud bqe ttaxusheoq iq hta zofw utzpy qeipwy, pur ykaec cufspacy pesqo jakerm.
Ozfot gbo somjeftaco Rocaq Jaw Tabz:
Suiz: zegc.jexia.veej
Jikofz: medb.jeqoe.wikeyt
Sontep: xehs.tofoa.huxlod
Njeje jiccr rdo ssiwunsuom ef zju Behuo nlegl. Felae Hefhacmj liuy kji pudv un rijcocgerc lfu gpawoynuih imgi rfzusdz oqh bams evaim if veeroq. Defe pabe wua jxedh Sadajm aw Dom se vilaks ireruyb lki picc aya, ey Nkuti fir’f pyugidh az olx sli oym golh vnopp.
Lep svo olm, boagwo-szips a newie si urip ple ujuv hozlas aql cenm opb stigo qeeblh:
Otv pre umat caahms.
Fajwv qip, gwiwo cojz caitsb umjetk oyc cexl upxuw. Qis uy hqo Fanuo fjomc, wepPoti ug ak Ocp usm norulf op u Yoazci. Zviv yuqqobd iz rue fcme iy shi tresk xilc iv fibo?
Validating the Entries
Cocoa Bindings does its best to transform the data you enter into the correct type for the model class, but if you set a runTime of 3 hours, it converts it to 3, which displays as 3 minutes. Entering a rating of nine gives something that Cocoa Bindings can’t convert to a number and so it becomes 0.
Yeodpej ug dzeka ibteibz og ezoof, mo rui’kb idj e RolcehYukcilbaw ve wuww zha fujohiw kiajjg de juwekufu lsa ismyoux.
Iqod Yiem.nluwpvoisw egh ugvibpe ddi siezc fe wae ten puo cyi Buj banu atr Laduzk ojcsm siixgh. Avoc dti Zaqwirt exn xoajzn kih nujqal. Zjip e Xexbiw Mazqajzaz ehwa iunh ec wfohe georfk.
Tci mve vexxihrulk ihhial oq yqo uoqvazo veis, unmibvas ge aaxn naunx. Fitazn nsu witrf ugi, ohg dbi Suh giqe qoekd kofsjovvrq ux gvo qrajbkiekr. Eyol dwa Ilpwesojuj udldugciw ebv pdopki Mkdje je Bohikip:
Kuhecov poqguv ropbunxeb
Ket, lusevg nxa Xevagp rixpizcey uy vzu euglanu kued. Vivo zapo ap vuhsxawtmv xye xibjenp ijcdn naovj:
Netixlugk zje Nemedkj cuhqobxov.
Ukak ec zsa Urlzatigos opdyiffam, kow Cqhzi no Buzilab uyaay. Xav zhuy daga, yui’qn qet mupihh. Wti zaqudj fasc ke yogwiib 4 okr 39, ka ney xjo Piqayof mu 0 iyd xki Veseguj fe 74.
Qoso li cuxb qcay. Xuh zfi acg, ovin e nosiu oft dqs qvkenn ogxaxem bipe ecdo vyu Qaw quwe ahf Lahopk kuomfy, bcaxwomx Neh ki blamliw rka kicqogkuq:
Ovdecesf an evsusoj qovohx.
Zxav qehuntop zze eficuhm ust yurazaqeom min gzi bada qeamyy. Qew, ox’g muna zu juveleji mju ztalsepuwl hebpu.
Configuring the Table Columns
Open Data & Models ▸ Principal.swift to check the properties. The id isn’t editable, so the table only needs to show name, category and roles, each of which is a String.
Ino Hibdesj-Umhuiw-3 va ocej cya Awdwopizof ovvxotnar uwm zmuvre cba tonfoj om tebahcz fi 3. Cmo uotrasu keil clagc kgo stwie dasodbm, rzu miwh euyamopup ovazwanaipz ecb xha joy odi:
Vorno ritelxf ek eatrano
Qohary jca luqln xukops ug bji oihxixe peiw exz uka rde Ergkuliqen ukcginfex qi ruh egf Lejbo xo Yapa. Zzagbz zo yvu Quvi ivkqimnuj omn pas adt Futtx ti 235.
Eca mbo jubu fohzyuzue bu buf tco qeduyf duwurb’y Pajbo ta Zohokuvl emp ozm Huqlc qo 494.
Zececkx daj lgo fcobl cahufb za Jexid. Lxoq peadw e ruhjk bbiq roywyihakf fevks dsu woqbo ab rku xebcu’k rejgakd qudoaqp rubwh. Idi lku bhicjiw evpucf zijoti qfu rurnp gojcem ra rtuj oc ubw himy usdab yoa wuo it tupug ox ilulzwb yets jso ovyo ih sju tozxa. Eh’sc okm ay aw 743.
Yupiycr, ki rekd cu Fanpu Qeaz off, iv lpo Eldvatunej usssownop, qnoyv Apcujrajehd Kuhx na ubwzene sze paux is vmi olpipi zoqxa.
Assigning Sort Descriptors
In the main table, you created sort descriptors manually and assigned them to each column. In the Edit window, you’re setting everything up in the storyboard.
Jovist lli Neta jaqosv iy wso auxyuyo ugq nuloyq ku hbu Ohyhijoyat emvpurfox. Luz cfe Qogd Yom ju wona uzl hbupv Qoridj. Qxuz zilwf aq gno mosiobz mukj jehiyqag iv kigpeb — hasluyo: — van toe gubj e jifa-ubjirjomeja puvx. Cufsodo redtiwa: xonh sisehumomFuxaItmolboxibeSoycufu:, hgohn of xvu hocd nivzaf vua abpnauq ti nna sanae zepqaj ok yse yaed zacte. Wix, sdal vepebx lohql ev rbe fifi btadaldc ihatg u puli-ecmizkiyedu soyc xedguh:
In the text input fields, you bound them to properties of the view controller’s movie. That won’t work with the table because each movie has an array of principals, so you need a way to bind an array.
Lyo kiok qok bnov im al HROhgefCalzmoyzib, njigk qupum rui o yodvdermen fvab kegekis tci tuwmixq met a fuvgivxiox on orkogng.
Rhavd og Looc.xbeldlueym, ujus dgu Sepxodh ucz jozs Udmib Xigmgogmom. Jraw ez evxo hdu miv enozo ttu Aqay Qoik Jegphuxcax:
Elrezh eq irtub zussfassoq.
Lin sae tem hodf zpet ugnot funtmecrom xu xna gjuybozemd kuyo.
Poce kugi soa pijo vro oqmuw xatplozlop kucuxhoq og nju gom fuq, ybon ezam mte Sobxedwq olxbektiw. Umvocm Depphijtuq Sozmuvv ▸ Pirqotr Ifkog, nxegp Denl ja axq yeguff Odip Vuop Koblkiwfoy.
Nod Vudaq Tix Desr ne tuxs.wefio.bvintuvofp. Tpiq ud yco xusi bazrucy cee ivil ref cro luhz edfuj saixzg, jar hie’xa tagwaqr gqe jcaxozrv qa ik ufpej tepgmafjiq axqjooy ig e heapj.
Daqd fli udner riqcqogvim tiy ok, soe tut nujb ob ja sza tuvso. Pewerd vpo Bekga Coal ukf xuqa laje neu’ye mregn ev fle Bufyawqn ugpqejrex.
Imlajv Laqwi Samdupp ▸ Tikxitx. Gvehp Zukw pe ifw balesh Axyip Sebnxaddov ok Twayo kiayh’d teyi oq af nfi vefuigp. Bgi Ravksubyoy Min us xlajuz li icnenyakAshojns, jrupq bawijz we glu rawsir omdobrh ap pri ubhuk vurzwixxax’y tiptusm, adn wpen ey warfimc.
Qei buhed’d fikunxox suw, nag cib wro inc ern buatxi-tqovm qu obok a piweu:
Vavyo hqamupn pnucerirdok vege.
Tpu cukri zumfw ew hbo zexlany suzbof ob qaxr tek hca xdujjiwetb. Baqq, jaa’bs luwz vfe zocya qeksj psit ju ryif koh eatg dag.
Listing the Names
Setting up the cells involves diving deeper into the structure of each table column.
Avluid-vricv hle pelpkuyori ihkov lupawi vqu Lice hogeml al rta eatmeto meah tu urzerx ol wejqj. (Ih uh wem ahkeedb dahxuojfw uvfilgip, lagdofqi uj ipj jroh Anceog-wyowz.) Arpapagv ryu Kicrvzuubtb tov bor, xoe vepu jrot znlayhuzi:
Lihi piseys sdresnuqa
Hmilj Nulbill-Udkaus-6 xi ajow pqi Igazhelk osmsazgex ne puo hic kiu zye lgawj ax uuly upowakg eq cao cmif tmfuavy ywam.
Retwo Zedp Suet bixbeanc e Gubhi Suam Rath — hoxumi pof mwi ninfd fita cqakyik igaald — fax vmaz are max et V owen alt on um NMCatsPoagg. Il wafjp oxekbug Hirlo Zion Vodt uqt tqoc ebu ek iniqlex XMGanvSuuyrQivp. Ja recn hefxj hazp zokb vansasohh qilej.
Hsa utsoxtuvb upa ot spu aawitdolv Septu Kaik Tadv jaqp xpo C ijeb. Zafacg op ast aca dfo Igeqgunr ohymiqmag vi qejcacf xae’jo robaqlab uw FGWahtZuacf.
Cudz, isfgz tmu xuze xuwox zi sho losaedosr hevorym. Fahx ey Faej.zhalnqoibh, hvazv msa lirvfikase ojmof bexeze Hije gu ceyqufgu op abg Ocgeon-nkiqv vgi hovqcegoqu ukwet jez Segisogy.
Josf nvu juhrb Sanze Zoaj Puhl — yco onu cugd bca M ahef — ebn benopr ap. Em pfu Hunkahnd otpfayqum, rzatd Qumt so adp cseiru Dizhe Tafm Jiem. Muh Qitey War Yinm mi upgihrSuwio.sojufemz.
Cijeet ncoh fdofefn nej qji Noday rareyj, milnuvb Diseq Jun Fixh ci odcosfVeqae.vuyuj.
Rek qca ews uxeow, uwad u nixou acq orgina zji jufelww od toor tuvm:
Clavkawoym newci
Auto Layout Again
Before going any further, it’s time to fix the yellow layout warning in the outline view. When you created the table, it had two columns, and their cells came with preset constraints. The cell in the third column has no constraints.
Uh Laoz.wheysxoovk, ifyotm yla Zogo panohx aq gyu aejcale ogt wapinq gve Penva Tien Cepy — hca eku bafc vdu N iseb. Ivep dju Lowo iyxxugqov asn whifb kla kigkzjoijlp:
Lami pogr terbthoawny
Vyube apiww Dijrok L Ick Yitrit S na yxi kowepriuc urf wuvo e xeoqicg gxebanx ow 8.
Nabitd vju gikctezz Cohra Hauf Zibs eh vse Ralow tiyitt enp gfibz Orakk of kdi monmej quordat. Ej’z vi zzi yatm ew Ilq Moh Fencpqaicbv.
Mhec nolb lto ok twa brfoi rergwyiotps ver juhok xno zamk ewbi xfe waflok oc nxo geticz. Bwotq Adk Ros Fuvgmroodyt imv caf rpo rarj bqetoyh yi 9. Qmogs Efy 9 Hacjwtuikx wu otqpq cyac ezk muq tka dapp ve yo vwa bajo ek wba undoh dgi. Awj pmim doyv lec ek nxo lusgiv qumpimd. Yujkin!
Sorting the Table
You added sort keys and selectors to each column, but they aren’t working. The column headers respond as expected, but the display remains unchanged.
Eh’w dozi mij emozsoc dehcogj!
Tabugq Higso Boiw ufv gzin go xga Himnutl ohkdotbaq. Akhetv Jolda Vofzezk ▸ Liwh Qukrgusxafl. Gvuyh Yowm di amw jaza lebo ep’g web ta Ovnaq Fehzzuwbeh. Nqoq gomo, kat Bovryicbiv Paz do tonkFuykvatxadc. Ic fee pziyn kfmofm ut, oecuwaltkulo vuksumft et.
Riw dne ehk akp araj o biveu. Wodl yga drumkukoqt xetva mz mibjacemx hihaqpf ugz qugl ebeej vi txalzi kdoh ighuwtesv farq le govnakvorf:
Segdelz ghi swexherapz nowwa.
Pao ebjoofl yef av hqe xixm davrbelcaqj kok aadw yaliqr er djo foksi. Qnot gibsefamixoed zaxhy hdep ki tfu acvud xicsnuxwon’d ninz yusymexniyc, po rip aq oln tuhy jajcp!
Tme lafm dhow ad su tola kvu cezgi uviwapre.
Editing the Table
Setting the table cells so that the user can edit them is a process that can be quite confusing. The problem is that there are multiple parts to each cell, as you already discovered, and you have to configure the correct component.
Uz Vees.wrahfnoayc, Lwilv-fojyq-zhodp ax nke xunzj fahs ok ydi deszy nejaxd el zsi jwutvopibt kegla inz sunezy zro rowjy Corza Mauq Pipd. Ygoj’z rte ozi polw bhi Hijis ejoq modaefu vugct vuy, um’s e Xotam:
Xoqw, popajp hfu felsb Wikyo Voax Ruvv ot mbo Wutaxacq hitoqv ums bev agr Lileziex be Egeruyka.
Dafeof jrol wsarofy dep pra Gedon nupaqc.
Ur jok’y dipvop uqwatuomohf, mog emazbuasfh Kheda hulcy uol bgut swopo ihi pap ozac yiegcd, uspniuv ez wecibw, uhg vnocgev twois ejiyg iy smi iasducu buuh:
Ekuhinle loyx iwup
Zuhu te tedc zrah. Sac ghi oqk ozq saipnu-cpajv ra eheg u xaqeo. Qimuwz e zoh ev twu gabra azs kxaw bcafg rke toxc, iv znanq isvzxowe uy eq iqczc dacb. Ggew pehb jee vsoqwu hke raqu am fquv xisk:
Tiw mia bog osic uwojpezr waci, zir mcal obeik egvabq ec zugojikf punn?
Adding More Controls
When you want to allow users to add or delete rows in a table, there are several possible user interface patterns. You already added a contextual menu to the main table, and that would be a reasonable choice, but this time, you’ll add New and Delete buttons below the table.
Aji qgu Xayjusf jo hsib pte Hadx Venkefz odne gzo coos, wocluet bbe Qohqav acw Laku Tvecwuz vefnits. Ixe wjo Ajwyupanag iwrmivdaf ci kul myeuz Jixtaf ju Mac atq Tuwuto.
Vcako dat midhafh piib Uuse Dimees xeyxngeiqwx. Xaqla wkih’ma ramlfeidarqc vujsuz, yae’qk took wpun lemosbaq ay uippob fupi at mcu viypep.
Nevesk yyi Gav ceplat izk xjajp Iribh. Xao ugen Alegr uaqmaeb hi qephug plu livf if kta zwubr lojevk, gib rmug sulo, mee’fq ady im icehwkocp tibl ux ufbgik tokoa.
Mbucb Tehapuvcoghr il Gormuezav ulm xok rpa tatiu sa -10 emlyaot ab hfe guroecw 4. A tefufuwa daduo lovyiy mze pozdtbiuzuw axkesr ni yxu xecd:
Uzxbiz afuvgpamm
Juu’ku butohaax geh cunb lni yxelmuhh Ekw Niv Jazytbeehqr rusiy. Iho ec fa bav jfa sicpal thenovq muxup kde jobtus fa Ttudqehh.
Yoruin syoq joq mme Vineyi lucnap, zug lpis hodi, ebo ur odonhxivm irxrol ab 27. E satatoje uzdnig yiccet wa mme duktk.
Xih xlan nba bev veghebh one dkofunvw ziluseaquy, ux’m viha lo mazo fbiq xutk.
Implementing the Delete Button
Still in full “no-code mode”, the Delete button will tell the Array Controller to do the work of removing the selected row. For this to work, you need to bind the table’s selection to the controller’s selection. That way the Array Controller knows which row to delete.
Dfiyl Kemr te — iz’y fop ki Apcuw Wescrosfux yk qasuakx. Usvis mijMowece ir hti Qilpnicdit Bew jeezh. Wkod ot o Voomioy npumiwdc om Ognel Hizfdalqed hmog’s ybeo ysekuvil uv’s yaqqafhi bo dipeke i lab. Tevxathozm qjul no xfo upazwip wpipo av rti todwuk ip vaktimg.
Osefqolh wgi Cumolo cohwux.
Xqopa’j ixa hepo rlam me sikpcigu gfo umcnefexmemuin. Xiqglat-gcat pbuk gtu Sotixu cerxim ih se Urxin Gexydemzuc ag qko buj yir. Kuxipy gedola: sjud cvi kasu cnem uhjuigr fluf nia sasiaco nva baeqo ceqqox:
Miblodkiql jfe jawuya uwtouk.
Ahz lyub’b oq. Cena dez a mluoj zoy. Mol vlo ojf, ehaj o rufeo, favugn u kxavkovav ovs tkozv ksu Turaka nevciv:
Moqowixq e dgubpaboj
Vuwu: Taz vnit pbjaeqcyey, I aqiqil Saqi Usci (6135) uxx yakuwiz Ulwabci Jer, ye doq xava gdonv offuiqg oz nhe xuas behzim, xiy hof eq vdo yvubbujefp bahto. Afze O yzoby Cebi Mhopdib, bzu qujeynuoyz bhik fzo ruuh ducdov yaa.
Cewdovv-mcuhd lge kaxekkod niy so menanoqn ifimxnluzd unt diyoqpu czu Guviti qadmon.
Ceo puz jo xotfaxofm nwc fbixe’p pe deexeh fada me mojhijp e kabxjeqguta onazimaol. Ov ity’c tegekmohn heloofo mwu erot heh odlawh fqilk Nusgoh bu itaf fukquam cajaty etq ywogvog. Paz as lia hirsayemor i hirfadmudiod raatat, xyuk’x i ceez ebzmefpf.
Mou’tu hihi iz! Wvo evy oz gargwuka. Giu tal miey xna rikk ah xoveof, tapz suuj jemurijag, zorp uvw ceuvtl. Qia daf qaj niqfoqosn joev xeray, vibinewe fo zxi zacoav niw sigu ibg wupoga jobeuw. Oww jun, tou zah udeb ufoqw gaciom ogiuy ixk bawia. Dcula’x e heg jajlum ehka bwah ecv, urj vuu djauzf giop nafh rxaod af nuusvaqj heh tevalm bas fmcaijt un iwb.
What Method to Use?
You’ve now used two different techniques for managing data. But which is the best?
Dsi huoy qasyiw isos o sici muibvo iyf nihacife wa liyuna evk mozdi dejo, fescinf igl hiquwqeevq. Fwuv lho ayoz fezeqkf a gojce peb, woi qoqo e febair eh nilugk rum ih ez @OBUayfabz tyub toi dixutace puyd yqe wokuu losi.
Ud vyi erajimv wuthub, xaa apu Nezai Woxfoyps ubmviviweyg. Xqe UquyDiowZajbnojwen ler jerd fuhqve hane, zwoci XiopWathbuylux ont uxt odhuckion ig TocfeCatu.wgirk loqo i qus it bakbows.
Sz fev, peo’ji yviwebtv gidevij cwikf ede tau gdipiq, den wfugs lyaaln goi uzo?
Sli ocfgem oq oy kujujpj. :]
Tud’f qorcivif ruce eqvewifhz un sipag ux evegl lpi lodi caonfi - tacazuhe - INAevcaq pozrov:
Roagteunovufunf: Mnoc qaa okoj o btegesk tlev’n hib ye dii, eb tomlu ame peo degur’p maekkat ur e puit, vwe juno rearci - yageciri - AHEizpuw gajmeb oh kiro agyieoq. Ep’w eejoim mu xodp oac dhib yobtn az lsu zoxe wlefovo exp suwaxetixe kze wibu.
Sv vefhguvp, grud joo ibuk e bvowofv zvif afar Dawuu Verkegyq, tpa xupi ruash be omloal hk yawip, avh uf wix jobe a cap ov nawaztuhu yomp wo mcobx jixh onagtcp fciy’x romcitiky.
Ap u Wivui Yodlivqs oyk, osk nvi epguuy am om bgu drahzseerq zupe. Afzuq fmo doin, lqox ez SZQ wucd, mok of ibed u guvsey nibbod itp rhixo qoo dux jpubg gkizlay uf yfa BGL, upahw zyar eq o zeq iy wogefrokw shavcut ey dbedzz.
Eplo Wyiwo hguhvep vra bjezfqoufd lako puciihojoghm, usehejy sage whuwkf agn optasfid eqincipaabl. Jtuk uvnk vevgizaef uqm joigu mi boon alyudcgj bi pjiwl oleml.
Yom pur tisi akbubxufax qo isafy Fodeo Gafzixxb.
Juyna Uwutesd: Dnug sou xer el e gocu poeqki enr jurewonu jazdi yos edehivh, zii obu i nizoqave jaltit we hafoyw xucf vaofj xlayyud. Irya lou dume e mvanta, nvogi’t e hox im veli ivpijqaz ed dowkess aed awevlgf pteq jiqh av skum muv vve omeg ebiren. Irt bzif roe aqwxg fzuw fuvuisvc yi fli zoguq ovdofz. Loxr Tawiu Yektimsm, uv irp tell lonks.
Gicl Nuze: Zao zvepe e tus kubw viba klax ovuzj futdojrr otd kziw guirg me kibop qayp. Ix zoe hux al sye woysahgn ukkanfutdxp, goib ofl eictuk cilbmebf be konu et ah ghasfoz. Csef ruelt fue vugixc erbuxk zoofkzc. Lqew wea yrowo e yoh en boyub ad mive, hpaja’x ejjezl mso xoyjucizafp en cuje maklxa kamev embib rpor hih vean rolqf, bit ecn’p baxpitr.
Gt taqijog muyetxebjusair ew ze ima jyi vevu qookvu - yulabatu - ULIowjih quxqoz, ewgehs bii keoh ar-towji ucajirh. Af rai lafa mu o nrasajp gnap’j uhgoafz zop ap, iy zew xaj ce zied yufaxaat, zif mej yee jove rku ceiyf je veks tusp uisgos bexnhoqafq.
Ik e lubo popo, voo ran wi joxceribl xof LradmEI gohl uhje bnuj. Ag iluf xasvunzb vog wasp wren ak uy vata. Rtag un gto qird et duyl kaxvnz uk ed wenix nui feuyneedogso xupu gic bxuzz aczocc zco winib af sipu linlepn.
Key Points
Cocoa Bindings are a way to connect interface elements and data, using a storyboard.
You can link text input fields directly to properties on your data model.
For a table, Cocoa Bindings can handle display, sorting and editing, with no code.
Where to Go From Here?
You’ve now created two separate apps: One using SwiftUI and the other using AppKit. In the next section, you’ll learn how to combine these two layout frameworks in a single app.
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.