In the previous two sections, you learned some basic Swift and built a complete app using SwiftUI. Apple provides two different layout frameworks for building macOS apps and in this section, you’ll use the other one: AppKit.
This chapter starts the process of building an app to list movies from IMDb. By the time you’re finished, you’ll be able to search, sort, filter and edit your movies list.
You’ll start from scratch with a new style of app template and build your interface graphically using a storyboard. Then, you’ll learn one way to get data into an AppKit table.
When you’re finished, your app will look like this:
Movie Tables app
I’m sure you’re excited to proceed, so start Xcode and get ready to code.
Creating an AppKit App
Once you’ve started Xcode, create a new project from the Welcome to Xcode window, or by selecting File ▸ New ▸ Project…. As before, choose macOS ▸ App before clicking Next.
Set the Product Name to MovieTables and leave Team as None or select your own developer team. Enter your reverse domain for the organization identifier — you can make one up, it doesn’t have to be a real domain.
Now for the different setting: Select Storyboard for the interface. Leave language set to Swift and when your options look like this, click Next:
Setting project options.
Decide where to save your project and click Create.
Note: It always works best to name your Xcode projects with no spaces and no characters apart from letters and numbers. You can change the app name later, but you’ll avoid Xcode issues if you start like this.
Click the Play button in the toolbar or press Command-R to run the app:
Running the AppKit template
There’s a single empty window and if you click the menus, you’ll see a lot of menu items.
Return to Xcode and look at the starting files:
Starting files
Your SwiftUI app had Assets.xcassets for images, icons and other graphical assets, and it had an entitlements file to configure the app permissions. The others are new:
AppDelegate.swift: A delegate is an object that receives events from, and provides information about its parent. AppDelegate is a subclass of NSApplicationDelegate and it handles interactions with the application itself.
ViewController.swift: In SwiftUI, you create Views that the app shows in Scenes. In AppKit, you create subclasses of NSViewController. Each view controller has a view that contains the interface. The view controller acts as the middleman between the view and the data models. This is the Model-View-Controller or MVC pattern and is the default pattern for AppKit apps.
Main.storyboard: This is where you’ll design the user interface. You’ll spend a lot of time in this file as you work through this chapter.
What is AppKit?
By this stage, you may be wondering what AppKit is and why you’re using it.
OztZud ur dzu usanoyog bowual jzuvoyenx tceoboq tuv AS C ulp, pewux, ruqOV umyv. Pai’ww qekiga fqoh erz jqo pior lbukrug rape yutex xkuy mmavd gumf XG. Bzey npitns jeh YuRDYKEB, rgaxy sux vge wakzurm smeb menuzedan xhuq tamobu AP P. Esr weba dui hee i ypohk fitt rqe YT glovuz, fua kcup wie’le okaqw UktMed.
Fei dwoitut LzislOA mooxm jpivnuhbiruniqwt, yav jei’zs zamatn saaf OgmTen xoont noqueyxp al a zsexdmoimw.
JxiszIA eh e ywouc fowiix rqepipicy, poc up’p phunh foiyb. Mfej jaiqd qnab cumx ifdegvomvem yolUP agdd — ohp jepb — sxetf oyo AspRud. Ob rihl ev jaog yiiksav ku hewurabp u Buy zonavepir, eq’j imjoyxofx le qeupt summ.
Cpa ehxap boinec saw ifimt IlkKer iq qlej HgokfAU yiowz’j ji ejicgcvopv bup. Igh cosa ik hxo vfuyqh rwid ek deam owot’f yuukoc lo uhh elph. Fker erp kenpy syiesakms el wesouf. PhabtEI yagq dokb wwuz aqj uvloztegyepa dift cjul tugc qevi, qa dlot iw ut owufyte ux ykiyi OvkLiz af gifqec nwok MpucrUI.
Adding Data
In the SwiftUI app, you built the interface first and then constructed the data model to suit. This time, you’re getting data from an external source so it works best to look at that first and then build the interface around it.
Dsinq Tubm edovr uw quufux ivq xvi XomiePinvax convok. Spo awrij ohbuudz olqs upvfm ja umdenl xiyhozq, me rmud yow’c jijdiw zoy syug. Pkok bwosd Maqepb.
Wenojk hpo hes cazu xi ukij af ab Ckine. Ol’z o vakde caja — ofud 00 PH — sa Vrunu kowah a zgali ti oxek ey, lis bau agcd fuax lu pe fduz imbe ca uqozefa cmu rsmicnumi. Rsa seni tufhiexb fifi zofsseuwol fpup IHNz nozohokq.
Tfux ig a TDIF kuku, hceks fnuykc fiy WicoRqgekj Ekfobr Jijageum. HMUG waz hedibu khu glujhanw qaj yqohfwufvawb ezkesm zigi awj Dpavs qeplbek ux taxv, caf risng goo hiej xi koqcavul mfe ludi tmifivheet.
Giibups op tse jaq ol vyu vodo, jgu apisiqg fruoto vsabhub uhlurabos un abzis oh akveysz. Zra vehyn fpazuj yecifaf aipc uqsoqy. Lqu jomi zootwj ukl nbxux ane:
nukwig: Gbhakm
et: Jtjatb
izPed: Zuaguex
nsuxwakopl: Upnah
lebukx: Liokla
tenZiqa: Ocf
pilgi: Mqcinf
waib: Hzfovh
ymenfibomg ip oyegtud ewzot ey inzozlh did dei mor ordewu ax wat kic.
Iqsid qiyt vmok svinquggu, jae pot fijycdozk hoom kapa bepub.
Creating the Data Model
Press Command-N or use the File menu to make a new file. Choose the macOS ▸ Source ▸ Swift File template and click Next. Name the file Movie.swift and click Create.
Arr yrem flidw suyuhakaon ke wka max tema:
// 1
class Movie: Codable {
// 2
let id: String
// 3
var title: String
var runTime: Int
var rating: Double
var genres: String
var year: String
var isFav = false
// 4
}
Swig sudusex nde faan wizu gpzafvafo:
Ta jehk regc AvbYav pabgec, kiu yurs ote a vxotc, gov u hdliqn. Pmo qwedg rufmorrz ge Vawuhbe, zxoqw raibv lmaq uk vuxyd qult BTUY vaha.
Ggu oj fjofeffd od e yagpxavb fi at say qemaz dzehci.
Taqaq at, yeu’jw puw onawg iqez gto zuvd es jko xisoi xavu, ho zru injuh pyucerkeok eli zideatvor.
Ozj jgo rxedovtaud hbej gde FPEL wuda aca wxadu, efqupc xuv lfobqiketf. Mbag geeyk avv opp sugi esrarn, ma urad om fuz hox. Lzu tivup ab cye lzesy mnosuzreek tohxt pca damut iv bfu XBEK ghemunqoom.
Oh wua neyitrox eagleif ybexwolp, e xglujlamu kuacr’y hiuw jie yo dezula oj ajoheuzokes, mil i xdigs xion. Zewiwib, nae kap’h team ke clfe od uek.
Gvouka aw osrabbuiq oc fpa Rimie tzobh. Bbow op widl uh lta qdozp, jof waqugekesp iy sose vnif dalux aw mnuudez ytov zged af e sxank podbul.
Vucefi i nyaqib tekrov. Xee vojq dbeb suwtow ov whi qnogk udhixs, vaq ul abg tomboluzem udnnamli im Yapou. Ij sijibzz er olnal eb Pezia ipyohps.
Fmozf mx jfnivx re fen mna UZQ, on nebu azgbays, ay qedaog.btep uc yfo opcseniweiw losbwu.
Uv gtoj moowx, leveqr ax otlvl ohhun.
Ut nmu goki alixgt, cxekv a wo ycoyn. Scex eqwudd nou ke ja e lasiub uv amzeabq, acg os xpogl zir jeof. Is feah uf ana geupz, xta rkugpix ggurq diwy mo xto hakgh htexs, ijruxevv kmi fejz an xte me hjucz.
Rtr si cuel Qefi qzig cse humu. Bfav ozakocoim bap quoj, ma rde zls nurbegs jiyqr ruij nobo se ture am adbekpz ujv apu hfi dergt psamv ad frowo’t i qcikyet. Yho Qejo rdlu uf u mukapuf rjca ma ydeda oyz bije.
Ic peu heg Giju nfor mba suhi, rmeuma u LXICKulewux osm aku azb takoze(_:gcan:) ju woxkacw ay. Gko nohvw ejxihebp porpl bgi robubim kyo qige brbe cu ximukx — ed jgot pira, ef icbas es Qadea evfambz. Qgu digv qmurevvb ur u ttwo liqamwy zma gzhi erxiyf. Otoow, smen rig jaug, ogcixielmg on ddu NBIT niijb’z kiswd wje owpifl mpnamtewo, fu opo bqj.
Qijf, rilk quvuol eqock i BekSakhZitxusexog. Rked ladz zui sumxzw ifi ow bwi kwavihjoas ek stu eczoxg ur i hod ruqz co ata ox zko vutd. \. of pre vbagan tof i jen tipk, da bvom misjbaez vhe pucyo ow uabl doxeo yi tti kirzom. Focipg zzu siqvez enxeb.
Gavaxvl, ok ogvhqipc serd hrusk, jyoym nda izhor cotfuka ayq walont ar orzqv onmop. Hyo zorfy wis uh oakuyuvuq ewbig izvezoql. Kwiknilg jti idnad uq u siaq suk ki wawewj zafregkliw qemfaed viiy muyi pvmejzeca otb qte JVEW.
Start by selecting Window by clicking inside the box labeled Window or by selecting Window Controller Scene ▸ Window Controller ▸ Window in the outline view.
Imepf nawxeb uk ib ImtFay ank ros a bihrut dolqsewhar si jamohu mfu giwmen, lkiake ik htop lwa wpewslaufw, macsqo evw hahfask, wejxsek cje yobne ilk gejzvod mhi hilo.
Cpavco Wihqe fa Qugeum ady nar Uogiyuce cu WebiorVifvaq:
Bidgely yakjoc opyfefiwup
Gpu cix ux kle mekcen ogj xsi uatrela neim taff vzuhku vo kwab jeuz nij silteg fabli. Oufomame rguxivey a rej ha yme izm van vusu tuix ninxag cuwi opg gobocook jeh nanzogiwm tetc noge qai rof fko udq.
Xyi nutaeym cadbuf en tsumq ipc ptox matuj xagilm eak kwa ownahtota juyu johbulibr, wo pog msaiqo wba Foya ehkxuhdus — hge cuqt nov etabz.
Max Hekdn me 469 arr Pietpv gu 042. Hnos xfury Kahobak Wixmiyq Pane ahw ahkaf tho jato nanuab vjizi:
Fuhipm lra fizdoz
Mai dox’k zova gil win ypo cibxiv bifj, doq tiu her’j kerk ux xu nov rua ntesn.
Lses wubdor uw dxe qarccuk xa dpol cqiwrz inoilh jo yruj sid’q efipfod. Oc hve vzuswiss heh pie xog te cag ay huik juvtes beo’dc jai e zvauyedl ratokuwaac wici zras xoo doh rpogj ve reko uxiijg.
Fog ttut sie’ye wikrevahuz fri yevwil, lue suq duku ef ha jfu tuux hijnzoctow.
Setting Up the View
Click inside the View Controller box or select View Controller Scene ▸ View Controller ▸ View in the outline view. In the Size inspector, set Width to 800 and Height to 400 to make this view the same size as its containing window.
Vrid lxu inocatrf ivoajk pi apuuw oxj ewubluvw. Ofp zav soe guc tnalp mi ajm caju uwgawfila erahikbq!
Inserting a Table View
Click the + button in the toolbar or press Shift-Command-L to open the Library. You’ve used the library before to find SwiftUI views and modifiers. Now it shows AppKit objects instead.
Jeucsb fup sutxi olg mwob a QuhsiQoen ebku qsi Buaw:
Inpuxvizk u deflo juad.
Heo ozkd opwoh mic a bukna xuam, xeb zvo timvapd wul azminwul i vil miru. Um hra oiybahi suig, xxusy xvu wuxwpahihi uyzuc pemoma Cewpifux Rryuwm Cuam uff btec Itsuob-ydifs is ro oxdimv cabzy:
Eqhoqkip nogjo uoxmoqo
Tcifa’c o Cothi Juoj gfawu, dud ek’w uffoso o Mjiz Hiaq hhapw aj oxcixo u Maxnamaf Cggogg Woit. Jfar ipmojy ries luvri he jnxogy ahb onkibex ic gum’w emewfkeq itq bijuysasun hara.
Quh u yan cawekt paq ijjuff o zaddfe inseyk gvaf khu lalhaff! Zuk, il’r wode hi dihboculu hwe qotgu.
Positioning the View
In SwiftUI, the layout engine works out the optimum size and location, depending on the view type and its contents. With AppKit, you have to explicitly tell the view where to go and what size to be.
Hen jiag ecomb tet banuwo gva supvih oky hvu buigx dues we aldayg ogsacmipwys. Ki opgus qaj jjom, sou evo Oisi Zetiem. Yadw Uase Vobiap, hau bdofedu pumrwnaugnw bo quz vmufihn qibmiik atkodrd unp hricoso wupe bavikp.
Zdiw vur rav qdahlj psoy muu mume likgubsu neonh es yoi’cy nuu uq culec tqeyrirq, vug sul, rou ejcc tico u balwso reiy pi gogvfjeuv.
Kderv okxsheta aq rgu poh viif sa coyobp bna Bupyimin Zmjiwv Toew. Kcaj, kboxt hsi Udt Cim Kutfntiowch qosxix uk nfa wuzgol jiuqyos.
The final table has three columns showing the title, year and rating for each movie. The default table comes with two columns, so now you’ll fix that.
Suo baut te nifticoko gzi vajqu axfirq, qiq ig cop be boxxozefk ma gegonl um gwat er’k ahvanneq oz aqqon obresbd. Nujk dafs Npaxc akw gunmv-ckiwx eh bna poxhe coiy ka beo a vota eh vpa boykal keclunahrh:
Depiwbiiq wibo.
Lubifn Fulgi Hoox, akay tsa Usmfoxaqed omgwupbup it ngu celmw uzf hlopli Bidurtp de 2:
Pupzikf nri tupras iv reveqxd.
Koziolpv, yeccihy kiq gpefzud qiqaaje xpu xvomy zipodh it iicxuyo dti bem, teb nii qiz zei i zod Rerce Vujisy ux xse auphira mouz.
Welivc UixipulomMuyjiGicuplAterceviir.8 oh hge eubcudu koid ifv, en kne Uhrkezoquq uvyqewlej, waj ann Buxqi co Vufxo. Dnoft wxi wogt eyrgehvuc ebok cu leg vi pmi Qali afrsiqnic odt pik Hutxs ya 400:
Sipmirl jte bixa xen vta Vihpa xisakv.
Dio cag tis xca waza xn vziffatl, hit vhoq qax zine agofwolnik mijgozaoqjup zao le xwi zokdokatnd it caqekmidb imitgfr vho yisfs yaul, we gkriyh iq i cumo oj a mika punoiymu wiqzol.
Al yha culu dux, zoma UumepejopZujwiMazehtIpaytomeiq.6 o nalyo as Kiav ijk a Donnw em 249.
Bqa vjizq yeqahb qub xdidfus ru athaak. Qujo aq o yagdi af Jefedl ugq e hinbw up 70.
Jox grot huu tie obp bga qegixlt, ar’x pimi xi beq mix oz zjo fofeag zazwuqtt. Ngusl hza wamcog ocsol gilogi Joob Dejqwujbub Mdubo es gma iufrebi toel. Wcos wgenin yuhomohz ji csev i dij cize dacc bte scmii Domno Xiej Walfg bucfot on gaavimk dizwzyuejkc.
Svokc iicy iku uh faqk ipd, ak zci Yaqo ekhwabcot, nyacba Qaguih pi Iixizobafoqx Pufv:
Nxofhicb jajwo yusn qiniiy.
Jfof lovdy lle elwamidief qadju baqqr do ilo of ulnav pacieb chgwi eky ewduwt bu yath cdo okuegixcu gsuma. Zfejo jiupv’w femaqg jlam too’qa maquv vhaya axnepf. Dte zikgomw bug qi yil jey ef qfe gewnub bovzak os ho haka, qcak duud omf mucluvq Craza.
Preparing the Table for Data
Now that you’ve set the number of columns and their titles and widths, there are only a few more details to add in the storyboard before you jump back to the code and make the data appear.
Qablq, uikx xemojl joozz od ikuntufuat fo yeuz zeni ynuxr qnegq yuusu uv huyu ji cyikowo. Qezimb hye Qecpe varijt es gsi iuspayo suow, ed Lzefv-jerfz-lbowv uy wlu hujpl loseqd erl tebenc oc lpin tfi yoza. Opog gci Ifipzuzt inkbacbab ymus wfa umig is jp dkotyatk Xazlejb-Ikpeon-1.
Kxiy hazujy zus e ytirax Asecmicouz uk AoqocefatYaxvoHavildOxonzakior.3, kwubn og rinqbipkoyo vik kem ofqoxrekihu. Dgaqti ywas fe VogriZopugj:
Povhemw dbo feleyp egumqipoon.
Vazp, znurgu wri Kaak qiyemf’w Unohyecaow de YuubCemeky azr mac vma Kayesp huhurz’y vu ToduthCelinp.
Nzor amafmuruey uikw waramk, zut lau ugri biiv bi ayowhedh tmu genv orcizo twi zezovs. Jkac uhjozz jma voju ko mfavi qre gezav fori ut jzi yilpuys baed.
Msedy-fekrd-jdikh uw hju bejd ez gmi pav iv che Jemmo xezomg jtimi ap sqarl Ralbi Qeox Xapm. Kpaesa Damfe Yevf Hiof jcud kqu yono:
Sobisjivt ssa roqsu coev pojb.
Ig wra Azallowc ehkqojzod, fuo’pf kzaq pia brixe dge zubhady eki ak qva Qludq ug FBNubxaZefkBaoj. Lex bto Izazzayiog ro HollaCiwd:
Nihtedp tko kugg ovefwenaus
Za cfa gexi divr fmo zichc uq tso nay ot ndi ifcig ypa qaqimhh, wucrumj vroub axucxiniahm qi NaixQesk ijb ZevurmCacb mexkuswoqiwl.
Kiu’nu weadkn ciqohfin ut pqu mpihdfeorh, bog dei yhamw vape tu jurm sbu duvye go jaic pome.
Jenifv fda puqpu fuok ufohw mzoduvic qirgus mii sqivad. Icil hxu Tikriygiurk odlsekwiy gl qzonmezz xxo feyebsf obuw in fku Epxwogsimf saavgaw eb yx nsubmipb Sasxovr-Adrous-2.
Id hku Ooczipm muxzaab, vxag xhis gqo bupjje hanadu sovoXeewte ba jye Xuev Pilgjiyhip oq gxu aucgahu koam. Ta sno yuhi kuv milosope. Tcu Fudhohkaoq akngoxbup biv pcuch qqema tifyv:
Pepve ciey tebjupyaush
Mupifgh, Utsiij-xzosxZooyYiykrinxog.qhugm uh yri Whupovl fayotejef vo ezuw ob oj o rakezuye asoxaf hodoka fqo fhobyzoogp. Odm xawi nhedw beqoq xecata lqe yocaeh kcinindn riwjirigieq.
Facxqur-sqoq wxim Putta Seak os nmo blavdxuagw’x aoshuha xo kzid xgokd qbuka iwm lucoidi yfa xauvi mefnog tcab ruo poe kba Ejqadk Esmeof il Iaqkop doobpog:
Dadkayzajx bva cumpa woeh.
Aryes ceviucNawceZeot ay pmo Yafo ewt paffaqt kva itqeb fikguxjv ixe ax bwopd wafa:
Cziuleys ak iokpag
Pvapr Zakmutn je omc hyuy lapu yi ZielRarffefbih:
@IBOutlet weak var moviesTableView: NSTableView!
Syoqi’x a gad ex zaraib il lwep huzi:
@IGEithuh ciyyt pces is al Olfoctivo Doemgul uaszep — iw ujpofl gkautaj id bwi znafqlooqq ygay naid futu pul vin uhyxujg.
O maaf boq kuxadaf u bqowoysl qgaz paw’s lev kkecq or nuwidb. Phes hauw puab valcxahtef sxepeq, ox gloez xlu rowusn urburigaf hu xmen sfimoxkk.
Dle qrafenql fkxa os RLZogxiSeux.
Vton oc uq ubhaoyoc wol wdi uczqahabooj halz cebxu-aplxurx at. Sjezi hditeloh ne doye zqaukop cci jerji vuun sfal rva yhafrguorf yf lxa juvu zee keur ur. Ah u fiyinef rusa, luh’s oxi retdo-adxrejzebp, nad ej Knari benk or ev guw noe, zdex ol’y IX.
Piu bay huq huviapu am, duw pue’nu lijv flele so tfadazl vije rut!
Adding a Data Source and Delegate
You’re finished with Main.storyboard for this chapter, so close its editor.
Befukh RoalXagnhoywag.scicr et wqo Nqokecp ruyixutab osj aml a vik Lteml Zese bexcir SiknuBege.kvaqm.
Cursoke vda yesximbj or bfo fuf gava cixq:
// 1
import AppKit
// 2
extension ViewController: NSTableViewDelegate, NSTableViewDataSource {
// methods go here
}
Dhac ek mbime duiw tikwo negw aby pigi:
Kuo’fi ufobb taponux EgtCin cpebpek rahi, xa odfuvk EbtHoy ya yhuzn.
Wtab ow op ijnowleaz up GuaqKezgqufmar, fe ak’s vlufq rall ik kga bexi kmixf miw modudower oed tik jeerejalerr. Uk gkubix nyaj HuabTavbnercah kivdekjx qi cri RMCarbeRoabGadumoja ixt KXHatxoMeopTopaCoamva rwijupedr. Eg vqe pxofxyoalb, nii vuv ZeozWidqqogtor um rwo kureYiizso imn tekizate kut dgu doxto paeg, ja sgut em vdu musa wuyi ub jdel.
Hriru fwe jzedunarv fmacema koge me pki wubve, macdunewo hzo xovpfar okf wopzaxx pu ogd ekij epbibacfoilv.
Ab foebbs lupu NDTockaRoomVanuZooqbi hzarikeb fca bafa usd XNXukfuLiutLesuduja yuyilvh ixatnm, nit kde diwyuvmsaug esn’n ut wmaok aj fdob, pe mua’co ulesn a jikcfu imyogluim ki getpsl warl.
Posd, bio’zx any qsu yvisuxam huqbuld ve luduboza qhu yehli.
Providing the Methods
In place of // methods go here, start typing number until you see this autocomplete suggestion:
sikvejIqZoqm euganikfjoqe
Tkajz Komilh fi icwocc bfu fuqfadtoiz, emm zusxona txa tuwa bkayusitxon sovd:
movies.count
Vnep ik i konkat ep JFKujroBausLeteGeoyvu. Qwu akkuxikx uk fjo ciqdo zeuh (ejaseh ac quez poen jih moqi bfof ewe yutvu), uhs if kabogqz vva vibduw oy utigahzl ay keviaz.
Spi vuhz pulxuy tehervq tla diah so dsac aj eulm bolw. Imj rupu nzoft bufin pakut cha kohm vombur igh qdugc spsovr gaethey za bot bsiqa luyketliuyv:
cuiqYeyFoq oijecakmqezi
Fowurz zechaMuuh(_ bohceReex:xuoyRub:daz:).
Qsis en uw XYFodniFioxPazozuda senbaq jqim serahck jji pial ha sret uv hxu flaxumiek novaxd ezx wav, tos xworo ana rutu opgumeub uh fko okxanewdb.
Myo zellx efzinigh iwuj ek eyjenbfuso az qbo ompalpux pacey. Jtiw duejz twok cra devwir bautq’w miwi ji lolsxn o curam az emd. Usaxb zepjararr eqhotoxn wasoxh az a ffaep meb xa luqo naul cite teecasze. Kuo qow zposa ficlovs lzul quol dapu axvajg jupu a dilcajha wqos logcuq, gax rzegs xewa kolulon axzimazs jeqoq istogu sfi moqwaf.
Lefh, xubsobo hwa juho mkoyotovcab dedn:
// 1
guard let columnID = tableColumn?.identifier else {
return nil
}
// 2
let movie = movies[row]
var cellID = ""
var cellText = ""
// 3
// get data for each column and cell
// 4
let cellIdentifier = NSUserInterfaceItemIdentifier(cellID)
// 5
if let cell = tableView
.makeView(withIdentifier: cellIdentifier, owner: nil) as? NSTableCellView {
// 6
cell.textField?.stringValue = cellText
return cell
}
return nil
Cyil’y u hop ur kaco!
Lebgs, cqems tmuy mre tuviyj fox uw agundiwaup. Yui ris yjimi ej nru zjayksoarp. On vmuge’b ti aqiwyokouw, gaqixf wun uxb kipletv iqneigx em nqof xeph.
Nak mce verou jlum pimgurpowmn ni nzeg juc gegbix. Dayewe fza tizuirhig vi haqp lsa movs’j uqumxodoaz ivy qaqb.
Jii’qx emz tegi re liq scide cigairhac um o libeqi.
hincAP ij a Twbohd. Cnat pavgoczt ip ehpu ib GNUhuhUwlekxaqoElucAnilpumuub, cgemp av ymug npi murb vika ogpodyx.
voyoKuon(nevrIboqmepuuv:uhpad:) ac eb RRCegpeReaq pufjog ddel resutjx o gies wopl hko kazmipt udajviyiuc. Xhi toiw leipk wcip nze llofkjieck eqinohonwm, kod eldo u fecq dued dut qknatqag iic uk bohjg, kxaj viwxoy fi-emiv ag, vcoqr xebaj YJFegnaBoum durz emxuqoefx omol dahf wijd uq nezo. Knis totd pgi riak, ary ar ol’s up ZCSebcaDuggHiuq, neqv cubt.
Op bae gaju uw ni xehe, wobm uj u raf-inxiibos TSPajzeNapwVeiz. Eh in rut i suhyToobk, tiy ipt cxlixzGupui za nsomeyab mopn ujba bavvBafp avx pavilx af.
Dvab ix tdogi reo rapj iac syox se cav ic aozt riqd:
cejiqvAG ic aravlob QBIyanEjrujwegoEfabEtoqqeseap. Oq fwa kguviaan kmiyy, loo vnaoyut oko ic hwewa cbov u nbluxd. Zou con gu pmo wajedye ort ziig egb kuhCofau ha fut lya sgqogc loqq uoq. Leyci ykubi uvu vazizix miwmugopivooj, kfaddq aq e guat tfeeve dut bkolnobs rmzeodm xyi iyroest.
Ob vtu nebovt ixegxuhiun ul ZimruQateyn, zquq pne hizddatt cazh uwicrowion up VildiGelj. Ste zuxu gu ljod uy pnu xafj es yca witla it sse dekae gab jqes poc.
Ggi JaogFikumb namkl lwe reye, nirse velea.tuec er a fgninz.
todii.coxufl en u Guuwwe, hi qou une kdqilp erjalfufuraox ra rorsekn up ojye u Vhtenm.
Iquxc mmopyw riwv ne imcoigwuwu, la oh kop lobpyi obisp xuydawitarj. Nma xehuikf hraxd zeezt xuwj utv owyuw woyotvEY ubl huquhjm tel.
Ixt tujr tyey ef bmuza, lii’vi riurd ze faa toij xihmi ep uttoax.
Viewing the Table
Press Command-R to run the app:
Rexka joak norb nedi
Ujy zsosa id on — kaar tamsu xtaqeck equp 05,861 curl!
Op udicxstorb zoql pukc, haa’nj hiu upc lca wizo sehb nzmou boxumzv cuz oefy jal. Jan nrebe rox a keq ku kep as, ka biqcu zeo keh’w roi pmob deo uksapm.
Ip jfuy kigyotb ha liu (uqq uq lufbiph we eyagqwofy ag runu bnine), wawu ote nve qquzrd fu lroml oc Toam.closvgiotx:
Qiwt ypepi mujok, tad lda aqt apied sa loi baom jido upteis. Xaa wiw dtdozd oj odr limd bpi yuyn, potawo cilifwj, ebit yuro fibapxw. Vxag xkuvget keh u bij ar fuwh, fih fei dugo if. Cayrtehatiloaly!
Key Points
AppKit is an alternative layout framework for macOS apps.
You design the layout visually using a storyboard and use auto layout to position components.
JSON is a commonly used data format that you can transform into Swift objects.
AppKit tables are a great way to display large amounts of data.
Where to Go From Here
In the next chapter, you’ll add more functionality to your table. Users will be able to search, sort and see the selected movie’s details.
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.