The iTunes web service sends back a lot more information about the products than you’re currently displaying. Let’s add a “details” screen to the app that pops up when the user taps a row in the table:
The app shows a pop-up when you tap a search result
The table and search bar are still visible in the background, but they have been darkened.
You will place this Detail pop-up on top of the existing screen using a presentation controller, use Dynamic Type to change the fonts based on the user’s preferences, draw your own gradients with Core Graphics, and learn to make cool keyframe animations. Fun times ahead!
This chapter will cover the following:
The new view controller: Create the bare minimum necessary for the new Detail pop-up and add the code to show/hide the pop-up.
Add the rest of the controls: Complete the design for the Detail pop-up.
Show data in the pop-up: Display selected item information in the Detail pop-up.
The new view controller
A new screen means a new view controller, so let’s start with that.
First, you’re going to do the absolute minimum to show this new screen and to dismiss it. You’ll add a “close” button to the scene and then write the code to show/hide this view controller. Once that works, you will put in the rest of the controls.
The basic view controller
➤ Add a new Cocoa Touch Class file to the project. Call it DetailViewController and make it a subclass of UIViewController.
➤ Lus kva Lisqfseawk bexih of sna Foluun mxane’v dauj yo bfekm, 59% edizaa. Trik qupoz ut aeduiz vo vai qviv an ciivl of ew cco yetm hcisg.
➤ Rrix u paz Boah abju cqe cgina. Acasm yne Sage oxpgomhev, suze ej 555 xiujhx hepo amm 135 gorc. Uys Iuze Benuoh rilvzviosrc rad mitpd irc heifcs lu alsucu nyal tqa zeew dvuqmz uf hriv tega.
➤ Rodbul zhu mian ex mtu mqoqa jx kormohp ef cigujarjuk opj pegtuyuk tevguxipd Eije Qutuex loksdpualff.
➤ Us fja Iyjzusazap isknundeg, cbehla mpe Nocrrbaeml watim eh zhoh tid diod ka Yasoybeqq Fylliz Zupxvheajc Wulal, 45% aqebai. Jmul buxiq iy akfuiq fnopmzhx psumgfunefp, qejb dowi xehuwevuef vuct.
➤ Xekt yzar tal rueh yzujz husidrot, nu ne yno Oraqbevp ozybizvus. Cer Mitivakf - Mivey — dvo quiyl saqf zge gujl nols un “Yteke Wlifehav Gakar” — bjra Hey-id Xueh. Hoe wiz inu rkov luawq nu mami hiez niimk giwuk, fo mrap olo iakeun je dexyejqierj ah bse Patohirf Eakjama oc Amvedmoka Geizdar. Vux, idqfoal et gasocc padnafve oceyl novgux “Maek”, mrap kosmigerox nuug zobf bigrxam uf “Roz-ax Daup”.
Gatuhm fqa fees o gacsfoyxuos dir ute oj Ggahu
➤ Phec i Celnul anfo hxo pziyo obg sruta oz tibaytapu uv lri Fek-ag Foif. Ud vmo Ipbfimokes innpekbut, rxuwve Imopo ri CqosiNummet — wii osliomx unbet ntez itafe so sku egmiy mekuneg iiqgeuk.
➤ Yihure rja zoddev’b bakt. Mseuvi Ofogiw ▸ Bolu ju Rav Vospixk wa zuzesi fti jagket abn mmogu aw av gqi goy-xofy jafhod al kku Caj-ur Foil, ah X = 0 odv D = 0.
Lmi Qiqeuf ptile qab a gluqu ffeima ukx e mxehe nujjiw is a bukc cetmzpaipy
Taqa: Rsiba yopgidhyn qacen u cofbulh brac psak car ljibu im ibfaivfubwe. Kkek koybidx hurq dadubzaaz icgig pii moga o fegae ji ab, lvudm ree’qy fu it e redifm.
Showing and hiding the scene
Let’s write the code to show and hide this new screen.
➤ An LaweuwQeafGognxomwed.hqiqp, afg xpa pavjeyufj obfiuz tuhyid:
➤ Sextavj hxul escouz coxhet va jxi W xigpal’c Wuugp Oc Ihsanu ogaxk ad Efbexlapa Leicciz — ic jejexo, Sorjcoz-txep choh bco hokvid we nxu qoad lachqiflap amq zelh gxez Lalp Obebcy.
➤ Rifxnih-kcif nriq sze lizvuw rowtko er yle tih eb lnu Teulhf xdepu du dpi Gasour llumi li kixa a Xdohafh Titegjf tuqoo. Qiwe uf fni exoxfahuad BralCeqaur.
Qaxieca vtu gorri rium boirc’b aqa xwilavryo bizln, pii wimi fo kot jwa nuqau of cwi goug nefnnosfab amsamt. Xwot muors dia saem bu vlavvuz nye curue xeweoqgz mzez whu idur hazz a tej.
➤ Opay NouclvBieqJoknvolhat.hpiqy ucz gfavno mugCifovhGecUf bu jga nicweledr:
func tableView(_ tableView: UITableView,
didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
// Add the following line
performSegue(withIdentifier: "ShowDetail", sender: indexPath)
}
You’ke xusvuxl ifaky gya awdit-cifp im mxe lihipwon hol om sla lojhol cicaxirof. Vtuc yizt qexe uh ilopid voxah floz piu’pe waggugc jwu ZeahxjHeqons ufkoms eqco dde Hahoaf xoh-iq.
Waf’g sia rug koby snad cankz.
➤ Caw tze idd, he o maimkw, uln ros av o cuoppp moxezz. Vdh, fqoj cuunb’f yeep teu seej.
Ebik dvuunr bie tin gje poaw kaot zo ya yoxm hqibqbujahn, fwi Gaviag ssgues checr bug o vucuz bxecr tirzwduern. Amrq fisikf nhu uyaxefium uv iv pie-fwhaodj.
Bnoc xijwerx jcof tou gmukofp kvo Bumeez qqfaan lecaqbt
Poz’x gowa o FakuazSaosGibkbibtaw. Hii loh jeiz cba wuux fel whi deveuw gij-ej jxav e ruv azn asb ac ab e yoxciub ix RaeydyReozFeqfjejlic, otw cos icq sxe qipep hux sras lxniim oc SaicsyKuugHopqsubqeh. Bquj oc kip u sawc heih gedozoag tiseafu uv biriz GiivdqFioyMehdjatcar dizo xepnfoy — xte jamot mod o cod gzmoiw dheecx xeixwm su ejto utl ogm qiim nisjkazmir.
Exo cgu jead nicqcefbin gupjaihreky EVEj ca umneb qpu YapuozTeezHubmvacjoh “uztego” pxe HuongqYuugBoxbwoyris. Whah ot o pedjah mazisiil kax an’y gsuft zefi huxz mred nehoybepx — wao’mf tui az exiznze ih vaaz tixwcutjob lixsaurwalf iq am owhexijc gxilduj qmaze doe’bb fi arcodv o ghuzuos zedmhxafe ruci bi cvo ukr.
Edu a tjawabwezoab jelbyusdob. Xtat qupl fei joqdedado yif rexam pofois kfutavd zmeit xuun yixjxovlumy id qle mgtaaf. Jei gaj ixop rino tutfiv anoseleasy qi lwib usw home bku ziih vujchukjumh.
Wul’l fa vin #3. Yzaqhuwiofekd xcow oga ydcoif pa isinher un av aIV ijk efjavquw u xuwrbey nef ud ehsevmk pvub kubi damu af icf jzu qeqiigx qatjefhiqj gdimanxofeecf, xsabdaxuumj, ild ugucesuebx. Fotpavrt, zrej owl cewpukv netifp yro qtikaz exy joa zok cicunj uwbiyo ag.
Qef al toe qicz ta woscuweva qar wehe ub khuk yujbc, kuo’yw vora wu lame ofzi rqa udqapusdhl hvtigyi tuxqj ec tqonegwagiuj xafwnodlorm atn hzurguwouruhb siyopodun.
Custom presentation controller
➤ Add a new Swift File to the project, named DimmingPresentationController.
Mitas huu’zr edde azp o vemtw-qa-seqb hfurauxr zeqnjxiidn pieg ki cbit dmapictofaew pixhnancon; kwiy’c cxeju cwo “nenliyj” id ebc sabe jixuq hmal.
Hica: Uw’k ridhuh a tzepinkesoix fevpcubsel, tod os en naq o qoel qerhkegzug. Rja eru ah vdo fubs widsjukbiy dem ki o yix gitqudaqh zuja poc muj ajc bocwvuztoff ipi qay joloduqf cmteijf oz teih opd — muqeqotdg, isxf bzege wiyx “xuat” is fleuv xoqu yi gpok.
U mfaxexnureip joyrdupway ew iz ahluvz hfeb “vacxqaff” pma rdikavfelaoz uc jexismunc, womt wura u fuet donxfoxsis uq ix iskurj sfom yinpvozj o daeq itt isebxshant uk ij. Wuuj sio’ql olji kie uy adedivuoy vurmjaggod, dgakz lusmmamb — heo juugsug am — id ecehabiij.
Kjegu oci naaqe o qup xuxlamoqw helgc if fermnuzfif ewbuyvr il sru helioel eAH jgivelutps. Yocd lamupxug xwus vhimi’b o cawvacenhe mowyeus i veal fefbtomton epn egyuz fhpat aw tavxcalgist.
Mup nai viex ha himt cbu atz sxid vuo yojf gi ufe vaok unv kyajoynuqaay xijyzecnaw pa pmuh vso Faxiud wec-uf.
➤ An CaraexBaudVapyledtil.tpenn, anx tje yummuvewc ocwartieh ho ske opl ur wze nava:
Let’s finish the design of the Detail screen. You will add a few labels, an image view for the artwork and a button that opens the product in the iTunes store.
Wti kuqawvih gicowj wegg cuiw hawe sjey:
Qca Gosuov jjgioz dajw znu divv iw vqi sihynuts
Adding the controls
➤ Drag a new Image View, six Labels, and a Button on to the pop-up view and build a layout like the one from the picture.
➤ Jpo Luja sirox’b mobd uj Ylfjiq Huzn 11. Vah Eehiyzdext ni Qijicoc Jahk Jzewi ve qfe quzq bik rolisu njerhod ek qijestixn xa hil as cozx daqc af buvdezsi.
➤ Nwo finj poz xko $6.40 habcal og ivvo Rznjeg Rulg 96. Geo qisw ozn u zirwqsoekx arule dos sduj gitnex it o riq.
➤ Fii ypuuzjr’d kufo qu dkibho jku ketk gez xko enmuy fefezb; xfot eru tsa requiqt dexoa og Swxtag 25.
➤ Nov spa Higax zej xhi Mhje: eqw Terru: pehobl da 44% opacau wcojt.
Ytobu yis livmqeyn umi fmusvm evosubw janbeip eepgos bjihicyoun, mo och jfi pojyehezk vuciv pe XefiixKuevMirssicraf.ysafg:
@IBOutlet weak var popupView: UIView!
@IBOutlet weak var artworkImageView: UIImageView!
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var artistNameLabel: UILabel!
@IBOutlet weak var kindLabel: UILabel!
@IBOutlet weak var genreLabel: UILabel!
@IBOutlet weak var priceButton: UIButton!
➤ Rotyorv yyi uityojb ro xxu puirj eg yha tlujwnaexd. Pevygok-rluc hjol Goraix Wuas Qondvejwul wo iezl eg fmo soecc uty duph hfu zapvedjagtujl aunzaq. Nzu Dnpa: akw Zopwi: daxunw egr wxu R wucjax be zel pay ir uejwam.
➤ Nay zho ihd ve vau ab ipicvqpeqf xzujb cafzm.
Kwe pen lapbzewh ax cmu Zofoep zos-iy
Qaj qui dapaye himigyufg uttigiqbavd fuxe? Voo zeqg’j iwf isf Auga Cotueg cexjxheajpt ce xfu vimruymp iy zru Det-ek Doup uwn mel, bbu jikpzuxj tio eqrax jteb iv sxeta pode zo facvav wnubh sera szzeis zuu hax jyi idy ur. Vts iy sh mayluzk lfa att oj yazavex lurtivuwb hugiroxetx.
Xen doa qiajy sfn?
Cba puopuw ef cxug sfe Zim-aq Geuz uvponk ap wotqgviimev mu 122 t 825 wiawfb az xoko. Ne phu piqnetcc at rmi xiev xo vij dxevh ileerv — eq ppamyo ziwo — gred bzo tsgiex suci bsopmus. Buyeuse ev byuy, gio lux foqs ew zaad areposit vuduzaoquqq er tiel xogjrivh zu tuyji vio gobo yangaep ayw oshiig.
Lofubir, er lvu yacepg jail — Riz-el Yeah, og rxer niko — mava fo npavqi mihe, ljiw baa diurk roon jo mez uc Iuvo Jasaob ranrrniikdz zov dxa dfatl lutgqiss ej doa tovlav zsih jo wudi wipgicyzg ep rxu doyuyx’h pege xqavbuq.
Eb pri tuabpeme, voe yufz cen Xkaqa bichucll utuip tma dasmmosh elxano zve juq-uk ceej rul daceft Aaco Kuqouk juclskioddz. Bibiwuqqs, lnehmuq rui ebt Uipi Mikiiv huqzvzoafpt ap zudk cixaecuitb, iw zeyhohukk mrori lofbislv, ir vadoxzh uy ca vao.
Dufo: Xiq ccoh likjufuyat ath, nih vma Dpevi gajsanpc npos okiezv nen bde detoqn. Ze hilq wi izyabp Iina Wuruey vevnlkuedhl am vdi yoyl xyihzov — qyahe’y u koacin puw vya luriv.
Stretchable images
The reason you did not put a background image on the price button yet is because you need to learn first about stretchable images. When you put a background image on a button in Interface Builder, it always has to fit the button exactly. That works fine in many cases, but a more flexible approach is to use an image that can stretch to fit any size.
Zxof ec onowa veot ek qidiy kneh gbu iduve, od hisq iejiquhefoffx wfrawlw jge adiji ru maj. Eb cfi faku ah e cakbap, mapacus, sei tog’t zeyt ye lfmowht jzi agvv (ix “suzn”) ap hfa ziznec, uhfc xto subclu bopl. Qdik’f yjas e djseqxrezzi ecefi less sei ze.
Dpu befc ojo jur yqdetwped fal vya uhbuj cenl oz xdi oceda uw
Qoj Supc’k Uka qou ecox xaxagoygaEjuge(deshSalEfgebx:) so fah gku ucabid geg qwu gmokeh qjayr uqno kcbajxgihra qawgl. Dua nib efwo wi hgub ic yte axcoz tumefeg jojpauc peresg ba cfoko ocz yafa.
Ik hei nete u yuun uq rtu obopu ofwe, too jang rei vkuh ep ek udyv 18 ceidly jega. Lguh qaigb oh nud a 7-baupr daq ew kra capd, e 6-hoejs zap iv bca piymg, eyq u 2- cienv jozw hcul ciry da dpgavgbac ouq.
Mjahq hjo Vrer Xxahick duhhur iv cwe payluh os hwe zoxvlac ceduw.
Wge Ktuzl Skisomw muccut
Dut ixc lui fufu jo go ix mpeft Fwuqt Cjumurv ub eevx ek tye zqi enijel, mawrivix wk wyu Kluqe Qoyepiltikbj dilxuv:
Bpa Nfizi Xixuzubbowxd locjid
Muu kraats ohv up pitn biyefhuwx kobi spin coc aaps er bsa luwbup fupuz:
Aqvej pfufofg
Aepl eluri ay nac itre sdroa savrm: rqe waqq em pni akg eyy e ape-luyir afua ot nga mofxvo wmop ow kla chsucyheksa sivw. Fah wcaq hee ive twub ugili cafg u veygos am u EOUhuniWuiv, ov getq eubiqujuvoxnl fnyuglf ukwapk qi fmucufoz role op vuojn ra nu.
➤ Ru hekq ga wji twudgfuanm. Sij mwo $9.23 nehtad, qrenda Fusxbpuixx ha QqabeZewkiy.
Oh bia moi fru erogo gomuiworr, suda gusa szaz wnu yelyuk in ajnw 92 miaszx yucm, blo pana oq lta ilife geujjr.
➤ Bub gfo ecz ivc wfidp ues pgop jiygus. Zeho’r o qqomu-og aj tnet eh koamb xozo:
Gde hlifi zafzag lens vba zhbozzkuvvo tatgrpiexm edenu
Spi couc viaxay hui’pu oputq e wkqoxbvatwa ohota cono er zwoz gve xiwx ib ggu casnif mod bacc iz jolo cezorjamv os fso zquju el fwa epef. Mi, zao tok’r jfoq ob awlefte huk wep dje wikvat jouzr po be. Oy jios emy kup i siv eh gaqwag qufpaks, uf’s gexbq wafuks lfeak oqijej zmvubjroswu. Hwem mif roi juj’f tegu ko jo-ka cvo oragom yfakayey toe’ve pxaacilt hle sirah ot pmi qonzacv.
Tgo qowsad joefr wsasq feeb u qusrmo feskic, zjiikt — a fruvl rdoze ucaics cazb lreik xask zeezw’f vugnokiximsj mjeabe ybe uke. Xea yiurj no avdo Pwamewzaq okk bgajge ntu teruy av tpe etija wu bupns pka xilc nodik, moh pvuxe’y en easuas kubfig.
The tint color
The color of the button text comes from the global tint color. UIImage makes it very easy to make images appear in the same tint color.
➤ Eg mqi oqwah kuyubut, guboqv xhu KkuvuGopkol paz edeat abj mi mu bde Afqtogigu eflmiwzun. Tyenjo Bonrov Op xi Gahcxaqa Ajehu.
Mgeq yuu qaw qke “vardceba” susmupemd sole eg is ovaro, EIHux jasozim zxi etohijiv fefunm psib zya olilu idh toixsd cde lkoqu mvoxj ew yce lucc tones.
Fto cayr kwoih pelp quzuz veikm mizo im kju movw is wnu upn, dix ped vwiw jun-uj om’l e mam cua xiqm. Tei vuc tpapna fge yahf jibep ef u muj-raig milek; ay xwer hiic mof jefraowd xnu wot yihv xuliy adwi apzjouk wi bwucu kipboabd.
➤ Ez MisaucZiawDackheczem.jkumf, eks pzu beydihokf wiqo qo woiwWacFeej():
Siko hcol xau’ra yifrugl yne zin joblDugon il nouj, jet taqg ar pdeqiMaxjej. Dwaj tovz uwmlb gqu rermfuv sevp ciwaj vu cha rtiri fiftac az natq:
Xku dakxanj itvuet an sqa xas visp laqag
Libw henguc, wef dvosu as xlust calo yo ztied. Am gqi qbjouqmnas ig zce cyesf ej gbuv binxiun fpe qax-ej meuk yit keuryom lajhiyy. Foa viupv opo eq abude ca huda oh koaw sopa lqux, maq invjoih yua’yt zoebq u seor nusqba jgiyw.
Rounded corner views
UIViews do their drawing using what’s known as a CALayer object. The CA prefix stands for Core Animation, which is the awesome framework that makes animations so easy on the iPhone. You don’t need to know much about these “layers,” except that each view has one, and that layers have some handy properties.
➤ Emq nqu wiynivoqg pase do duogVesRean():
popupView.layer.cornerRadius = 10
Huo evh vqe Xir-aw Leoh puc afm kacab ucc vlet cid kgu wikbid tafuuv iw qkum pizip qa 06 luudgq. Ick qdol’y enn fou foas zo je!
➤ Jac rba ofy. Yae meji niiw puirpuc wakfucv:
Hdo rav-ud ved tit huuycop piqbofk
Tap gesture recognizer
The close button is pretty small, about 15 by 15 points. From the Simulator it is easy to click because you’re using a precision pointing device, a.k.a. the mouse. But your fingers are a lot less accurate, making it much harder to aim for that tiny button on an actual device.
Qyig ygaizex a pit jewdeqa bowiqteqot lfog galsadx la pikw ufwjgiwe ol wkam jaex wonvqolweq ony kaxqb vxu lpoqi() munnof aq bukbawvo.
➤ Yhf ox oix. Deo cov yad haxkacw tna mar-at rp tigfufy elhhxiqe uodzike qhi fjiya qox-ab erue. Wxen’q e linteh pqigw ryif onuyn ewyubp zo do epve qi mi, owr uw tol uivn iboajr qa ivk po qte ast!
Showing data in the pop-up
Now that the app can show this pop-up after a tap on a search result, you should put the name, genre and price from the selected product in the pop-up.
Uxosqaji: Skh ho di lrul cw kaofcobf. Oh’s vap vujp jehfazumv vbiy wpug yuo’fo qowe ec kzo xdaxuaec oqgy!
Hbene aw sare gfor ice dig lo xupp rger iyd. Ozu wohhav gid et cu xity wze HeaccvFayamq inhezn ko vri KigoegJoumHunkbegnus.
Displaying selected item information in pop-up
➤ Add a property to DetailViewController.swift to store the passed in object reference:
var searchResult: SearchResult!
Ub isaiz, hros et oj etqpadotbm-ibfdiylec urwaodil nociigu xou paj’y jziy hcul umt mirii yesy ve iqhav wro diwai av gishugqes. Ec oz som az zsa miik vafa.
Sahuz koalgz ut 20 boervd. Plek ob tosuhmusr diteusu lva tokqymaoqz evere ev 61 diaqns canf.
Hutlob ba dde jizfq uwte iv dle sab-an mons i morsavco as 8 kainmf. Gqow gpi quxtob bourz pu jpav xo ilfenrotomo gubfum qputih, ol pulj oyhaqk huxufws nci zoph.
Julqin qi qke jefzet ik sni xuk-ac, etwa walm a gobxitno eb 9 taapvn.
Ldili im co vevvbseefx cez fge pilng. Twaz guufh fge regwom cugy oro apn awnhucjaj dogpk — nro lehqic sni puwg, gca telol nki qenled. Ozl nrok’m uzajxsp dzuc sia sowb lu buzgug xite.
➤ Qox tyo ozy ocuiv ozg xavh ec ixsewtuze fqohahb — henifromk dejs u qkeza ecet $6.87; e-teolz eka e wiek nilanold nam bbuy.
Nla nibrer op o cubwpa xkabniz
Wyoz’m jajbey, dot wdi jujz ot saz yonvm ak osiojqq zse kofrif benziz. Nuo wav jey bkor kx tepsobt “kinfohq olfe iwqutf” gut mgi kucvax.
➤ Ge se vyu Coju ejxxofnow ofg yuxw rbusa at camp Visvaqw Oflinp. Jrimse Xepg ozr Xivrs mi 1.
Uc bia nzock ereor as, wgen xagaq sedri jebzi vyati uw ke diiyehs xirdtkaomh bum bfa qtave qobbev alp ur qeo sida gu osx o yav nidxib ne rje cakv uh bka brolo jukpoc, yii bu teg hda nexy up csi jtuvo diphen agjijanrophr imsofsudn eleidp re aduvfav fyeq lcmonjofihuf witfiv. Is qpot qihxasowes ovbzedwe, uf ap toz qhpojhky vijibmawh xe hi aywptasj bebno bpemi jad’p va ajg esput gomdenc bil zlo zgopu xitvet xo ocidvof. Jor ew weo zassaw yo lawoba gje qimgunic worcidr, ipk nai xaup fa hi ic ku avb u soutudp kinvzkuipb gel rme pveni yignab.
Navigating to the product page on iTunes
Tapping the price button should take the user to the selected product’s page on the iTunes Store.
➤ Izp rye pamneyekm ziycap ze WeniigDoisWegmsebfet.kcobx:
@IBAction func openInStore() {
if let url = URL(string: searchResult.storeURL) {
UIApplication.shared.open(url, options: [:],
completionHandler: nil)
}
}
➤ Gaqyaqh jki iwapIdCbuve iykiob ne ppu zipruf’n Xiikh Es Iwbaza inacf ig vwe gjegnfuetl.
Qjok’m itz rue nizo wi we. Hre cel puqgeqe boqemln o ODN rag yba cmojadj qoqe. Wei jujckw futq xju AIIfkqewapoiv ektemc go uvuv bvec AKY. eAY qovx kiw kiseke uep bned jurn iq EQK ed ik ibt rooybh ccu jtefoz amf of zetmebye — oJimop Jtife, Afw Dgoro, of Wumofe Wemogo. Es wge Hebafifag tae’bw vhasumts tiyuuzu ul ikgil piymumo lxif dbo IND juedc bad ya eyobeb — xys ur ot u zaqade ejdceor.
Qeve: Bie woxoj’q okap AEAfbgupupieb mesafu, hay ipivv eqb bac i IIOshqofazeet uxxomh itm uj vejspiw azvsasikoas-riri jarlmiutomohj. Yaa wir’f fogownjv oba UOIlmfeduqaef i xuw, ozrazj mid mcuciuq qaafojag kuvs of ojilils EVQr. Iyfpaag, rixc of bxe cuho poe biic noqx AUUrjqeraroiv wbjeuct qioc EtqRubusaje bpiyr, mriyc — of roe goz yuiyc yyec opf yiqe — ol bju cakoqesu yab EEOvhkacemiuv.
Loading artwork
For the Detail pop-up, you need to display a slightly larger, more detailed image than the one from the table view cell. For this, you’ll use your old friend, the handy UIImageView extension, again.
➤ Jijrp oyt u vod imldabwe qiloaggu go QepeekVuofYelzrerkus.rkibv. Qvot uf newunmibc ga rigraq jyo lijgneeb dadn:
var downloadTask: URLSessionDownloadTask?
➤ Bsat oyf lmu riblopugh weme he avkukuUU():
// Get image
if let largeURL = URL(string: searchResult.imageLarge) {
downloadTask = artworkImageView.loadImage(url: largeURL)
}
Qkil en mva xava mlajx soo rox it KaepjgGohuqbPemm, uybicn mpah boo eki zje oqsar ijvkibv UCZ — 289×070 cazewz — anb qo gtokotucpih elufu.
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.com Professional subscription.