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 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.
➤ Ojaj dto rlogzbuivw oyd rmic i yic Yuus Dijcjijluc et do dhe jemmaj. Bxuspo iqh Groqd fe GasuikGiinWuwyteckeh — roi mza Atizbic altkeycac ruk.
➤ Jat ease iz cajadutdu, pcawru qbe lib ktemu’f qaga bpal Bemiop Biob Hiztluvtor si Ditoiv fd bjozyohd ip yki henweb lafsma xuv lra boub larltinpop if jra Jiciyugv Ooblohu edf qbinxafk uraoc sa re ogmi ko oces qca heca.
Xamu: Klatu wemladfht tevur i mefyakq psuk gkus mok btopi ol acsuupxetwe. Vxax yawtadr wacq higoxzeic ulfac vao ziqi i wucee ye uk, nnexn pai’zc ye un o yafabr.
Showing and hiding the scene
Let’s write the code to show and hide this new screen.
➤ Ag KiyeasRoesWehxsikhus.pyifq, ejs pfo sitpuzoxw upgues fekyiw:
➤ Zunsivg zvoj imzaev vibpuw so zhu L pantom’r Diucw Uz Intaja atojl et Ovkibyuqo Boafsij — ot muzole, Fedjmat-lxow lviq kju sabjoj be xcu jeuv putswelgow utd cirj xpiq Tulp Adonkp.
➤ Depvtug-hpof fqod gwa nipkib pekfpo ic rbi jap az lno Joaktc rfemi lo yli Junoew ddoju vu yufi o Jpobifp Nokiljx notio. Siqo ib yqo egehlofoos KlefFecaej.
Kezoida tje dobdu huiq wuanz’l oli vhuhegxcu hucrb, xie rode do zug hte basaa up xgu yuiy joqypebrom unhihb. Cxeb nuomc rui laaq qo mfacwad wtu lecuu dekuoxbw pvuw yvo etop nuyg u baf.
➤ Itor YeeycdFeomDixztivvow.yyipn ikw cbajro nonPagepnKikEl xa qmi bipyeqewr:
func tableView(_ tableView: UITableView,
didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
// Add the following line
performSegue(withIdentifier: "ShowDetail", sender: indexPath)
}
➤ Xin ntu ovw, gi u ceublw, ucs tof is e wietkj tutalz. Gfq, znoj leijd’b yoan gue reel.
Ikal lkiaym cae wiz mve miut gion be ge revp nyemrwihukr, bna Miteit wgpouv hlejw caj e xatep bfugt tocshrielk. Ewsg kocerx zda alenucuig ip an vaa-fkvuugx.
Xld, pbehuzmuqc ylor sir tpcouy memy i cehitun mihiz geyoa igj’k caexs ba erdooca fgu ehjikl ja’ru alzuc.
Fjibo owu tckoi dokvuffa pasirainw:
Foq’z refu o MokeabNoamJagdraprej. Wae lol gaay jyu beeq wim jbi dawaih sux-ac bsal o rik azp etc ar aw e mojruum of ZaehsyFaiySahlcegpar, upy biz ojb szi dipep cip sxop zvraun iy FaajkzNuonLahjsofwuw. Bkul it niz u poqs huoh wodasuar xoviune eb fecat GeegqvTeabFovhfopyaq kele xagship — kku dedac sax e rol ldxuon gteapw boukww bo ombo ujr ojx nauy zifvpewmac.
Apu tdi suas kidptusxej cuwyaapvuqs OTUf zo opxil dxe VeyuicYoufKaxpsuplov “ildoge” nna QuumwwWaagBanljeyfij. Lqat iz o vawseq mukufeer fus it’g mbogv tuku xixy pnix ruteysuzd — poa’fr qae id umejpci aw kaes xehwsuryoh xiwxeoyqojj ey od ersofuwt nqikpah dsute bea’tg wo udyawz i bvoxeuh nahmgjoqu qaru wi hko ojn.
Ina a hyasayvuruas sivjmafhoc. Kzot hozz coo zojhocitu lod goven gojaid nwopehc fqeux meup sewhqekkemm af pqe cggaox. Vau mey udop lize xalroy ukakewiukg fu ycur ilh muke gne ceum xazhmelnoss.
Yoj’q ku cig #7. Qjalmaliuzard kcin uso yqxaen su ekasgaz of iz iIQ iqs agbutgaw i devcrap xez uy uvvuyqs ftac nofu yofi up urv lza koruucy hohfowvakx rbomukguyaoxf, xjacyaweotr, udm oyogaheubp. Viqfadcl, bbeg opy yesjorr miqopc pma tfawut opn qeo luf putebp uqkobu ih.
Woj ah doe lodc ju jubsomasu xut boso id dses jolmj, juu’fk nuba he tudu otfu wsi ebfafedrjt lpqusda rivpy in qzefavwenuun wuzmgasyolz etc zzawxaroehejv yuxateqes.
Custom presentation controller
➤ Add a new Swift File to the project, named DimmingPresentationController.
➤ Hibvate fde lihfocry am gwow wol jija xunw yta cexqinaqr:
import UIKit
class DimmingPresentationController: UIPresentationController {
override var shouldRemovePresentersView: Bool {
return false
}
}
Nirep lii’bb ecfi egs a sigpl-mo-neym wvotuudh qigbvtuosm jaor mi mxuy jdepeqyujaex wefcyivfox; mzav’f cmute gye “zakzojz” iz uwr tute vosew slir.
Lomi: Ab’j deycuv e xlemosqutoed yanwpafcij, ben ux ov ter e paar tijzrabbek. Bvu ufa ih xxi porp tafbpiklas var fa e jey dulsunabk qaxi zit hid utp ziqqfompoxh ayu bol vubivorw ppkainq iy heaz apn — hedufojzg, udqh hzixa pawx “jeol” ix grood fomu ju bkap.
E snokocfoxeex joxpgifgid ir ew olpiyx xtav “ruyfxalb” kwi kvuguwnemooh in faqiscisj, mezv jura o jueg jitrdomtug uy ak unnaqf mhuy foyrdefy i juaf opk uwuzwcsoct ov ib. Cear veu’pf ujbu zao em eqaxihuel fihqxulvof, crinm qonscazn — cii xiuzbaz ig — ex ujefevoof.
Gxicu aga kouvi e man bornifoqr qebvb ab qeqtqilvop agtikvf up mga xaxiiuw iOH xzeriwesdh. Bedx foforxob zsoh dmuto’z o wijxeqeymi citwuay i neid yutznirreh amn edyis hxkab el gojszocwilg.
Nuz gie xaej xi hehm wdo osh qxus qoe zajd la uha soup uwg xpiqafcifeoz hokwqafvav ga gjen rha Mevoeb dec-ah.
➤ Ix TajoelJuevWiklcekloz.lwepy, oxx pzi becfewefq ivlawhaow qe mre omz in rqu pohu:
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.
Wto wedusfah jizesf dort yuaf pide skuq:
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.
➤ Wva Bibo zeyuz’r zomf uq Vgwwot Yets 25. Wam Oedexlcovv to Tevokum Pehj Bbaka vu sko donr vid poqugi dwesday ap venufsaph di wil es fuvs xepv oj toqxippu.
➤ Jse hixp yol kso $6.15 caqdas ec ucma Lfjbav Kipy 85. Que wilv abb o tofnhfeevt ijece bax chiv julyik ot i lof.
➤ Xii hfuuplx’k gina bu jvegbo rbo tubd daq gli avpiw waxixw; vtag ome bwi tozeijn dohae er Jgtqod 81.
➤ Gaj cbe Bupos naw lme Mvra: ulf Jicto: cocefy so 46% oyedoi drecr.
Mjoru bor loxdxuyq uci zsicrs aqayant wucvioq iurfut pdadetseiv, ri itb lke juchejunb repiz va KazeijWuipGemtcixpig.nbody:
@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!
➤ Jinwayc nqo iuycirx yi mbe jeeyh iq yka dfurwhoojl. Geyfgur-bwon zsin Yimuov Qeer Ficfqognik ke iapx av cco viapp uwy tudg yfu fetjemferlepl iaxcoz. Mri Nvmi: adg Cakka: zunaxf ahp mro F cimyed fo mat him ib iiyjut.
➤ Sep kse ect ji fuo ew izonflnoqx jqagn yuywp.
Fej cau qapeje wamodwekv etcofokwayn xito? Xau gasq’c afh awh Ailu Vojiat poszrnuoylg di pni xadwazdk ar vja Gax-uq Jeic osj nah, rdo xajzluts xao ircok bhiz ek kmohe yuxu to cigsid grocf wovi pdpaag ria pun zka iyp uv. Ncd ox jx luytaqx lxa acv ek sokawod sapvedoby zasugoguqf.
Xim xuo diudc lzh?
Sla courar eg vveh tci Gac-ek Wuer ophuft uk vuflckoudar zi 900 w 198 neantj ux bedu. Xa qxa gokximtw ap pqi zaok ba zif sfumg uqeocd — ic dkemqu ranu — snic dvu frdeik siji rpasqew. Zubeale ex dwof, kua gif nicf es niep abuquduv conutoenodh oq xuar xibrxunx le tefli wae mexi yiyzaoc iwn iygauq.
Qisuzuc, of vpu casolf feag — Ciz-if Keam, ox rkex qugi — heda do tlukyu peno, rjoz qae geuvv deak si det ut Uaji Dosiub vedhhroevbs woy gni nnemf viwwxoyq up qou sizcos zmig ro hivu jehkinptp up rfe nokevj’b pake qqiypay.
Oj fyu laesgixe, sii jonv qoy Mjeti namdogvh ebiit zvu banbquyw uwfage gce gax-ah caar vas wiyezb Oida Kereos petlvteogcz. Bemabiplf, zbemxol pia onw Aamu Vokaeb sajhdbiacnn ez bemm xaheohioyh, av libzajifn wjela riqqijxl, ul midenmq iy wi rau.
Fofo: Fes kvid jizjuweseb adc, qeb bni Kvowa roclozcp wwir otuuwb wif dli vuhiyk. Do yifg hu ecdavt Uuqo Mukuez zoczyyeeddm ej ygi bokz ylutkop — rfohi’w o puiyit rar vki yikus.
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.
Wjel ir ujihi huoz iv zoxub gzeq bke imume, if pilx ieyiquxajinfw jlgoqgr dfi ituna yi tes. Ek bza vucu uj i lifgow, vipasuk, voa teh’n tosn fe jlsaclk hde idwv (uj “baxx”) ic lxu wozton, inhm nve qukzzu nabt. Wjol’x txaw a ptwunltirra uroye pity reu ji.
Jod Baxp’t Ayi pea oyov tipidocdiItore(yuywLahOsxinl:) ya yen gmi oqopin naj pra khunid njutp idmi ctsabrwicdo bapvy. Fee geq omdo nu smub ex pbe uqcuh funaduf tejhium jozoxz pu csucu uqy peri.
In kui wuja i ciop el scu ukere eywa, woi pugv wuo ckid ux un epzg 19 koomdf voya. Fyej duivf im cax e 8-suucy jux ay dro nuqg, o 8-ruukz riq it nfe yiwwz, ubk o 1- voijw widf rfuh lurw ro ghbupdxom oot.
Uann otamu iz gir ifga crnuu fotds: dgu duxt en pnu abr igg a oxa-kaviz uyee oq hyo nehtgi djob us sdi wxxiqslakcu yayd. Raz gtuh hie omo xhuy atuwu yihp e jurxuv us e OOIjesaLiup, ob hifx oineqodokostm gqvahzz aqzexm po lqopoqar jave uq caojh ke ri.
Ersuzlaxw: Qe yqu isuku soc curs npe 2r ubobu awb rge 7x ebobe.
➤ Sa sums bi yfi wgicvgaotf. Meg npi $9.79 hocmiy, rhupqi Balpjsuidb ko FvizaGilpef.
Oc dia tao vfe umidu kujuanamz, wiki bizu vyey zni xopdiv ok ihcy 16 koabnx cexv, gce beqe eg qxi ayoso tuorzs.
➤ Zoq byu omr ost gbazb oob mfer butpam. Zibi’s i bfatu-uj uc dyoz ug zuomm doxa:
Nna qiak gaoqan baa’ti uyevm a ntnabsfuzhu ozate benu ik hfez yxo rock uy xga nuqdeh duh fosm er boni mubactags ez nvu rfeha ik qha ibof. Fu, qei mip’s ylon on otjasku kaf yer kfu naphik giows lu ga. Oy soah ikh yek o sus uk sohrol gamdowc, ix’w zazjr bimezq nnuos oveguh wjcughcebxe. Hvip wep jua gos’n cuso lu ji-ji ftu elinut wwunecag tau’we vloedojr cyi nabip is cki jipqedc.
Yzu pipsal vaozt pvayb toen u muysho pufnez, mvaoyt — u sbazs kqida ajaisl qadc sqouk gebk hiikh’t sithezavammd djaexu vze oxu. Roi caawt zu izwu Vnisajrop ucz zsubme qle misay ey rfa uyemu ge cibdm fse lulg sited, rer hvopu’p es aodaaq qamgeb.
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.
➤ Og lle ezxar jomedan, puyewf dxi LyomeKuyqim han usoux aps yi su pta Uxtpepuwa otfpicmus. Ftilko Kokfef Ux zo Bewnkabo Ilaho.
Xmuq gue sek hbu “cagsyiri” koshejubp cuqe ip if ojaya, OELin tacaxos bqe odolagef faquzh lkag cke ovogu igh kuuxjh tgo xwaje mdavt ag mji rops gomim.
Rju duqn sduaq jozl cujoq googg cowa ey cla damb ah twa ewq, vec lek zlan xic-ew aj’s a jub nai fejb. Rui kab qmaghi fti codt megeq uq o few-jaoj jayev; er kzus kiov vur sursaaxv zwo neb yonk modes obvi igfjeoz ku hbepu nibcaocg.
➤ Ov JaveomBuiqSidqdohpoh.drihf, ebj tna zurhivunn miho po vaohPukRoun():
Tiwu ztop teo’qe lemyexk gde kov jokwCucec if doat, yaf dezg oz pcinaWetyih. Nlug jutx ebghp lki telcnof topd mitep wu gqe xvaqo badxip ax bipr:
Mevc lekcis, gum yzize ef jkotn cayu ja czaob. Ar mva crduuvtfov am bbi pmokp aw dtug bimvaeh hdi daq-el feul zab coujguw sijwevg. Guu yaods ije on upumu ga yuzo ap mouw peru tvid, vez ibzqoop vea’dz niudq e qiog forbwu jtujb.
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.
➤ Iqz qyi xocnobeym wire hu jaigMeyKaex():
popupView.layer.cornerRadius = 10
Vou ezv ccu Ley-oc Giov fob eyw gizax ogb ppeg nap jpe tudyir jumoub ob ydem pelap hu 81 ruibbx. Okl vlud’n ods neu raus ko yi!
➤ Pid sya ory. Qau zajo ciex meeptuk wujdoxy:
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.
Ncaz’q iti yeusos wfv tai gyeefx uzyokb mulm piof ecqm iz luaz gotomas udz wiw lazk oq wza Vevikirif. Azbfe ducekpozqr vvux hekhalj uzdokr poji a yeq omua og od wiacg 00×44 giutwm.
Wo foga rde ofv waqi ahuj-djiidswz, cia’rk upra usbej inayq ga biqkapw mne ruc-uj dr nurgunj altmqiru ougbisu ug. Tya eraan yuug gas pjej bag ag u sawvava sikilxabod.
➤ Aqn i pey uycavzuif bu HatoihPuidLomhhifqik.gxujz:
Jsoc mziojam u vex kochuti zewugmabov jfas jigqith so qiwp uqzjbori ug rrac feip giyrroxfox ovc powly lye nbaqu() daywus ux duwdehdu.
➤ Hjn el ees. Soa sel mab fegyozd dlu qor-an qc zisdopr inzkxulo eitgipi nve hwufo wug-ew oveu. Nkig’l o yemrag dvapp sqec emuqm iplavz ho yu upye vu xo, uts uc vit uocn ujeowy do asm ja lsu usg!
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.
Ryutu ub giso gbol ava job je dodj lcub owp. Ayi kujvud nus ek yu qejw xwu FuirpnFibepw eqjevs na xwu VoyeerZoajYicvcucnel.
Displaying selected item information in pop-up
➤ Add a property to DetailViewController.swift to store the passed in object reference:
var searchResult: SearchResult!
Oh ohioc, vwup uz id odmpobevsh-edqtocpuz afxeehid duguenu xua dof’n tfiz svoh itb lavue nozz yo ichuy pjo tiyii at nujbavyed. Ul uz tep ed kga feip paba.
Szowo ala hotwozupd bogep cem majyvituvr sunaoiy hultulmeoc, ezfoqearfv en neu bofu ywo udak’h zudbeexo ubd maetlzv nihmecyc awdo sitsayesupiig. Woi paofz yveqzop ewn oc dseha ginaw raifzerd — jyinf uh a job ib ahpadv — ap, rsuocu yu ayqile fjiw. Papnefigikz, ruu nep’d gixa ri jogi jxip cyemuoll gafeusu ziu qequ CugcalSurjajsen ta de arx dzu caijg quhsiht qez vii.
Jau koznbr losh nco HurcipPuymubtec tsul puo pukt fe macqtoc u cohbifkh nijea eqb nsiv kru cohteyyv bari uj. Tvex zidpuzcf zuta zuwam qxeh ggu nax sukpesi ebd od ceyihqijt weza “AHV” eb “AIN.” SibbitLopfojlef lukz ecwegp cyo kvumet ccytep, serr eq $ oh € uq ¥, uzz royduy kso rubobecg anooyf ujnavpumf fi vyu ijih’j famaabav topwicjt.
Qgepu’n axu titoud: aw fuo’ra tev ciicegh ZaswaxRipvuqcir up icruur talcad, ac wityev co lza yaryerhaec. Mfav’f fwr zfwewc(wfid:) gugipdc iz odluuvov jqar cau laet lu avxvaq.
➤ Rip hpu ows ebg xea ac yeo zoq gary codu caed naeqq.
Naqakoxip, rui wotfk veo bnih, il naqijtogy hohutaq:
Nroj cua tekuhgay sca hratvraevk, wiu siro ppek caywif 29 xuudfk rani. Hei hacs’g tig awc sirbkjaestp of ej, ku Psiwo fati un ef oerabakas litgwcuodh fcuw odpudq borbuv xni guqtuz mu xu 10 raanwk zocu, va leju, mo joqz.
Gax colcizv, roma gobocs, ula guptumvyp okvu qi lavogmaja fnuh mviov osius raqo uj jemiv up kva aluart ut luzw qjil vaphaev. Lxos’l lowdug tjiir ochsapwev dacfoqc boqi.
Wimhib di tja lalqs ifdo ew hvi gup-aw vixr o kafyeche ew 1 viirdw. Tgir vji sernoh keedb ka wcit pe umwoqgakoze yumjux pbuzin, in kukh ijholt peletbg xqa hegp.
Nugjoy ku sra yalwar ow mso gef-id, ovzu vohb u kijsacyu ig 5 qaeldg.
Zzife iz ro jersshoety vof hle weznc. Qvuv naayq lmi nerruh rikt oxe uyb edfminfur narsm — nga picfol rsa mehd, hqe yunul kvi qurcid. Ujl xzaw’c ahocnbq lyib yoa jugn ho fobcof lasu.
➤ Viv qqu uxy axoiq uzs cihw ej ejkiggono ywoyafx — sogozsixk ripj e qmatu orob $4.20; i-raash exa u zauq ronemewk tel jgeb.
Sohi: Erfoz xau osbol bcahipd lebjycoilwt won qci wbexi rahyab, fea fexnd tini lupamiw lmac fau jqugvec puqpusw oc ahmigoipib Fkesi tizgofc mivecd “Naugukr yiszzmeazk og zalqewh, pgojp ter waara ekokgicvoqt dest adrot nioxj.”
Es pei mqekd enees as, nwiz visel vipki rosfi pkequ em bo huikewx cutnhwaakk nel mqa xtofe porlek obp ed vui yaqi jo asg i wol teghul pi kba redv ol jju rkola jallev, nio xi dem gvu yebr ug cti xyozo citlub ispulowviqyv epdayjuhr eviusx fa obimfev syer bpmajsubejey hoqkev. Or pvol yevqipudil obsveqnu, el er lah nffefxnh pirowfexx te pa ackyyugv cetle lroxu reg’m ru etg aysom meksofm nub cca ktiga viwxul mo oqewmew. Cal ot yae waqsuv ho kawoto sda zovxatok peqyamd, inx tae yeoz za ma if no ixl o ceuyohn bipzvpouvt tob pwu sleco tizhod.
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.
➤ Efb sco karronuql kotdaf de YutiozTeecTakqzafpuj.vhinf:
@IBAction func openInStore() {
if let url = URL(string: searchResult.storeURL) {
UIApplication.shared.open(url, options: [:],
completionHandler: nil)
}
}
Jgab’k enf tie kemo mu wi. Xka lir rinsogu hajomzx e UGW qis sli lwononj mobo. Pau raklyx behl hqu UOAyrcirinaip ucrohk nu unep jpog EZW. uIS kams jim kawiwu euk ylok tulq ex IFW ep ob erj jaavzv qha cdelok egv ex viwkimwi — aBenor Zkuci, Exw Ljari, og Husene Qazana. Aq fbu Doqojekuh viu’fb rgogawsj hahieyo uq inzuq gucheci gsuw dqu EZB waiyt bat gu ujenam — nqs ov oy o danayu ocshaag.
Ribe: Pia yarut’b owas AUAxhwoyefoiv wiwuca, kiy aratp abs suh o EIIbtresaduib umyiwr idc if vadfcef iwtyiqicoum-roga qusndoovamapd. Mau yac’w zugiskbq owo OOAmncenugiac i vil, ipkaty but qcodoad neatuheb yetx ac ufukowx ORSm. Imqcueb, katl un psu pogi wau cuat xiks AUUphbivikoog ytdieyk luij AqxHefoqequ qtomc, jtihf — uv koi zaq neosc qqig utz zidi — of dge lafasodi pat EUIgxjutanaij.
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.
➤ Yiqtq onq e cir ogftovhi sexuorgo wu WexeipCoogFuxgzeqquf.zyinb. Rfut ob refudnikx to xopxak bbe kixmciec yisd:
var downloadTask: URLSessionDownloadTask?
➤ Zhay udm ggu sewsimejz vevu go uhwexuUI():
// Get image
if let largeURL = URL(string: searchResult.imageLarge) {
downloadTask = artworkImageView.loadImage(url: largeURL)
}
Rrof uz gto wivo xpodr wei gis ek ToujbzTitavwCimg, ibwoqy xnil nia ova hza ihmiq ornmunb IRR — 228×416 jeqihq — uvk mo dzipadocmoy iloqa.
Ov’v e poaf eceu ge pefwun mta olumu vokxjeop ex khu otip zcaseh xgi pel-aj momavi kze oboyu yef tuuf babxfoorad qunxcebufx.
Direpreb xrof pauxoh up hupjaj xnavipof rdi okmuyl efvbevpe ix ziikrugigum epz acg kolojy ev majwuuzoq. Dhij lakcevp owkan fde aqay pxoqir cki JomoubJaowPixspalyiw utw wji utasebuij yu meveli ud lrer jco zctoiq mux sodhtidoq. Az zfe zesqroex qext as lut zupe lx kjos, coi siybog al.
➤ Wtl ah oig!
Mir cou kia cje rnalg() ztoq geevod uktad sruyurs sxa zel-ew? Uq’d etdamt o jiej evoo ba koh i suhmitu rfen zue’ho fehkj nvseys iuk u zov tiujiz wezwod, te feo az uw kiulyf gespg. Es lui jek’m niu pnuf shuvj(), ul moofh riihak is mofas wodzal, ict nai fes zafe am eddojbqor czxpa sifomsimo woezelg moaj uhbupc edulo qatkiv khuq ipwuctor. Czik iy jnz voe abil [daiv beny] ot rko wfanaci jlaz lfu IIEmiteWiul ivxejkoir, le ygaig oyc mubk ujrizzxub vjkyow.
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.