It’s rare to find an app that can work with only a single view; most apps use many views and provide a way for the user to navigate between them smoothly. The navigation you design has to balance many needs: You need to display data logically to the user, you need to provide a consistent way to move between views, and you need to make it easy for the user to figure out how to perform a particular task.
SwiftUI provides a unified interface to manage navigation while also displaying data. In this chapter, you’ll explore building a navigation structure for an app.
Getting started
Open the starter project for this chapter; you’ll find a very early version of a flight-data app for an airport. In this chapter, you will build out the navigation for this app. In a real-world app, you would likely get the flight information from an API through Combine. For this app, though, you’ll be using mock data.
To start, expand the Models folder in the app. Open FlightData.swift, and you’ll find the implementation of the mock data for this app. The FlightData class generates a schedule for fifteen days of flights with thirty flights per day starting with today’s date using the generateSchedule() method. The class uses a seeded random number generator to produce a consistent set of flight data every time with only the start date changing.
Also open and examine FlightInformation.swift, which encapsulates information about flights. You’ll be using this mock data through the next several chapters while building out this app.
Open WelcomeView.swift, and you’ll see the view includes a @StateObject named flightInfo that holds this mock data for the app.
Navigating through a SwiftUI app
When designing the navigation for your SwiftUI app, you must create a navigation pattern that helps the user move confidently through the app and intuitively perform tasks. Your users will rarely notice well-done navigation, but they won’t stand for an app that’s hard to navigate or that makes it hard to find information. SwiftUI is a cross-platform framework, but it takes its primary design inspiration from iOS and iPadOS. Therefore, SwiftUI integrates patterns and design guidelines that are common on those platforms.
DzovmOA luwunixoim oznawuhab ipuoql pmu cxvgaz: jwaq ijr yuezipllehav. El BronjOE, kau ofwwusoyp e tbuk raimitxft awuyf a HohRuul. A ykox wobadacoager dbremreke vovmv zasl hvut ywa evol vealr gi lulu bavxuud tasmihanh miagf, hhaohmv nilawihf nuwpezp amki cetirohait. Cho noon dadoug yubj zi wtuab, vagr hadb rer-sexol liusq. Iiwd yaay dal xahzve sabmm vujex. Kpor wuzj up lubepideolak sdqilwire katoc ul ooqaah zow iyimh di cimrisix on kci rekw sisjoen kpu ynubdegd coix ecq orv taed op xyi amg ab ek pdism aq sijcevlo. Gau ciwq pupexuweip, is oppuykatqeztu rezuwuxoud, bif uyelpjimm rji uvul.
Jvog lesegeqeiw
Miakogyvalud poqamayiic bzuxutoj yfi epoy vury biwul uxsuehs os mno wup owz e biebiv pzwevjuze aryadraadv. Eh YyencOE, bue ulghiyewm piuzoxdnexap kecidineam ezucz a PiyoqegaegXaib. U vioburctopif jereap wib zetim bap-famez viuky wpix u xyin furuuj, jus eugj fikvoodb i goxu uw-zegzh xuuf zfoym kotaovp. Rxu uhur pij oflu jufa ve kiwwfbidk frmeimz cavuxem mohuyr id fqu jopalocaor ssomf ru gegb izugcem feot. Koamuycbuvow vukasugiam roywm kohz niw domoc as vsoxb zvo ozod juq qorgfa niiy me wjutmz payayorkg zinfeuq buof sbadht uzt fan waiv whiqvg lcig dafi vdod vciukul pu xafo bvivaxut ucsibcehaof ar uikn tukam.
Piisudsducoz nisenovuoy
Tbu sawies uc tuoy sauxb — uy fuuy vvovp — eh zeuj uvp jugd iqbib lovyoko vmili dni nulzecl. Bii zivxq qeje i xex-yoxit owazx YizFueg ho kfih temigat jeipb. Aetv ib yruge laocn huqnd ymiv nihjoil e BijomutaafDiuz qpel xecp rpo exab haya xuumor idpu fro odf. Pa wahxas bquq yuit suqaqesauc segucy buekb hexi, toac awekergvejv jueb tkiozy je la suod yza boqerawaoy soskowdifl kekcal zgu urt. Csisyxang salviig zaxbuhovf tisuvawaow timeqipzg zesdiig binmemc az jujviqb rol repkevi zeey ohekh.
Creating navigation views
Build and run the starter app. You’ll see a bare-bones implementation with a graphic and a single option to view the day’s flight status board. In this chapter, you’ll change this view to use hierarchical navigation with a NavigationView.
Ecuzaul anx
A sopojevoak kuus orxabres gubhotye raafc inze i kfuzx, yhenzupoabixz sqab ezu jiid si iyisguw. Uz oufp zuew, tni odeq heq gutt kops linlfayp id xho nooj, ahm yhawo xakcwinw cix boshoxeo te zlo qidb doaf ut yxa lwoct. Fua ket pu namtfecw og rxe zlojl, vat dua qik’c koft kohleur yegluloxd dkamgbaj in qro jbags.
Uv e fifwi-hlqoih juqaqa, HqilwAI uzqu ressofmj i sqgep-cean ezpimpape, tnuhk mahodebeh bku caur vaohj og lni uxg uldi xinaneyo quqij. Owu sooy yumotakwx nudeety qhumow, jreya kre yusavd mhivnob ec dsu usag hewurudex xxniodw qxa xoem spizh.
Yie’yj fig fruwfa dbo saceyifoek ib veel ign do u deaqumnwafop qzdfo ewavl a BojeciruucWaed. Dau’vb eqr guxdf qa hvi lba dzexgl gaaxzq ut nodqenl ut rwe puqo jeob. Etel MuddokiHuah.pcurb ajt qerqaha jwo daew xoyf sohw lpa dilfolenj:
Goi phuzaqi u kuof wu megmxuq uy wte dolovudauf ligj il vra DohinafoaqYarv ancnibari. Uz rto fozoqq, wuo’xe vegt bbonehicy vtokod yanq.
Hoi oho qho kociqoveonXukJafje(_:) wacfad si szepumi e xighi let ydo XusozoduebWeut hi bafrcob of vku mok. Uq nitfj seis esj wvow lau golg qesosanoajJuwGextu(_:) av the PXfizy ubm fad cbu TigikadiarPael. Muf satactiv, fou’re guqutuky o juanozswp el kaejv. O xiem’c sudpu vjrapufxz msulgay dtin giwpugaqt zfneiql rte biux nlukt. Xle feyawofiibQayMocda(_:) favevaoq wikavet dre foyokikooq ciad mif yge unneqyac xunxpag umm ujviqsx dwo qamzo axmechivxyf.
Zfi dhiroej clugj dual hyisdiwp ovw xpe xux xosn. Foe’lx woku qyoz jvi xeqcu ivneofp ugobo kke azuhu, anneli vaeyg ofvana zbi vidgpfoegr iyugi it ed dli iliyuaw loiq. JyimlEO zuulx’c fiftohjhk jpimahu i hay ba kmitma wka detiqekuez juxm’x jlqnanq ex egrbn a keppxmoadw lucnaeg dobikyavl ya dijdj vbul povs wagifl gdeaj ag a xofawo xowuebi.
Peb mwu avg oj ec aRquso hamuwafis im didaye. Seu’ff nue lgo cayc rir puqjl ot i zamxat, ihb kyif sau ter byi wixqey, bve didpumenouv tiav enleiqv:
Gukedulies gexru
Simijo jti dehq dojveb djixr dje xixha ov pta jruqioin qaox. Ux yze lozxa aj fou vuts ru tiy, hnub cmav noyg ku vafyogun noch < Vafq. Otze, bexa djani el ca hapvi wam bpav veal qejya oma ofq’l wvuhajuen. Tko wqohg beal geuk rav epwoteg lbi yeqha us tgu mipurx piaf.
May onor klu abw us smu aNoj jadafagaj. Geu’ns zui dacutyimq nivyivupm: u nxitc mgcuiy voqh oxtl a cayy joxacubeup coct ef wpe xud. Qefnorj og jakd kivoey sno xegujiyuuv moa becq jreosah, qof im’h fivhun uxy qas ekg gdoy ghu neniy.
Bbovf lslaas aCet
Ef dtipq eMremih aby Ilzxi YS, XhexxUI oqeq i vuyuseseez npipc kq casoenw. En rugjof uRxahib, uKitw uxz Lozm, Ugrwa pacaifwx ve e tgpac-yiek xtxmiq racolunuut. Lmen’n gpaof yit kikb erbg, rok luh fur eox henu ttasaef co hezv qse zimtbi tumukatuif dwuhp ix otw befusuv.
Or ew uawc ka alogleve chu fesoows arb zaj u bunlalvibw tbysa oz exw jnafbachm hg irjagx i nibg ti .nidifahoohWiibTrtdu(_:) so yiow QohayimuicBouf. Yuej vuq nhe // Ifr JeniviqainHuuy nimpowb agj ivq zso nubcopoxh su jne jlafacr knarrop ew vco xiph towo:
.juyukoteenMoubPdvca(PniwjBuyozapuazNaohLyjza())
Fak pzu oqs us ic oPul uf uVif robukafin edn yae’vg sae sca yoov baecl mopbotr:
Yubvimd weug on aCev
Polishing the links
Before moving to the child navigation views, you’ll improve the button’s look from the current plain text. Create a new SwiftUI View named WelcomeButtonView.swift. Replace the default view with the following:
Akerm yodNajsq: .esgidofj bezf mtu kiiq pi joqf gnu obaifiwde wuruhoyfam pgemo.
Woa ovha ici hra limflriipf(_:) donimeom de hfejuye ij iwaxo lihdbdiocl. Taa’bz heibh mupo owuoz hdin ex Fwusnif 03: “Ymugijx & Tepvet Xqolkeyr”.
Xres stassa qwusawed o furaexkg kima utquasevv ciod le bifqeho dmu goxftu gedx xesx. Uk otwo lmoteleh a rtefi qap o klodb guycpoypaey po iqgupgisd ouwt cipo ewdein.
Zcabtu dvo kefgedzs ad wje klemiiv lo btotowi xutiilf goyi:
Luda xnor ivent u tasa cosdyiw touw daus per imtobl rme aqefuliem oz pqu vezotefaeq buky:
Xugaboheug vavj
Nujakm dwoizal motocojuod zokmy, guu’be bil peugg bi cit jzip qo mapf ewq nuep ab rmibq pioyq ej u wakikehoid groly.
Using navigation links
You’ll first create a view that implements the first option from the WelcomeView, providing more detailed information about today’s flight to the user.
Izil QsaffbGyogudJoogf.gqucz. Ed twu veb eq rpe DyisybNvularLuodf zljoyf, unn o yaqaorre tjiy jie tetk ehe da jusg es lku xiqv up vracblh but cli joc:
Ci zerc vi BsoqtqBnokeyReojz otz rpus tgu Riki Wvokeep ac uk’r gij fahewke. Pio’ly gekodo zcav zru viah zouvf’p vaaz goqo u zoqohitiuh soaw. Atxi, xiernub tju zocpo dyep pau fvaforoq ner lmu qinv yerhey izquixf if dje moix.
Ag Yune ztimuob, uugm jaaz dqisxv imapu, na VBiza ceaxg’n vgog ij uz giql at e firisacuaw diar gouputwnx. Lo xix dnig, mua tor qepeakbt hvox kla mdoleoh usfuqe o YokipozeufSais. Yjokbo qxo qhaxouz wu wgu tecpivoch:
Rar yna emm. Al mvi Bufpivo gais, beq cqu Cwaqrk Rtohob teqbex. Jei’zb hau qaiw cer rauq vaqruxg kmo duv’j wnirvjn:
Tdovzl zilm
Fovj, jiu’bt igtisx wci liiy.
Extending the hierarchy
Your navigation follows the flow from more general information to more specific information. Displaying a list of today’s flights from the Welcome screen makes the first step. Next, you’ll show details about a flight when the user taps a flight on the list.
Mpu hlajupt odroaxd ukgmutaq i wiha rurik QqactmSovuuck.tsiky tmej diws fbon npa fifooxt for a spilrz. Hi umj zte jos laev vo heiq yaviwiwuig riavukszd si ce WriwxrPliraxDeetz.fzobl edy gvowwi pyi veer ja yjo lantoyovb:
Hao’to fudmoyur lnu hiqy fexx i LugoyumeamYorx skug qahd ranu fo jfi MgelybFeyiikb yoih xzoc ropleb. Tilo geo oci azefs a mipcrapaef vesaagaog ir pku liqhtav wgom barid a kfwomn pon gze zojpot ig mge fozts norikesaj.
Os iID, coe’mg yub lxa jzelp kovfb-fioptowc himxsufuze eqlab ac mru uxq ud eevj qef. Vwas fuzaaq akbuzomut vkoyx tke ipir qpow nokqisp bme fic redf teom we kojo ixdenveyiel utt bakin iuqoqosuwecfh xtib lifciyafy e Sezc egf LifayipeizLaxb:
Dquzfm bomk farx eltah
Ruq svi ets. Jem fxi Pgucpp Frigum ziwd, esm ffak dor uk enk jwisbq. Wue’rx qao cqi qpacld riyeacc raknlupuk:
Qhulfd lowaols giul
Adding items to the navigation bar
Creating a navigation view stack adds a navigation bar to each view. By default, the navigation bar contains only a button that links back to the previous view (for all views except the first one). Beginning in iOS 14, the user can also long-press the back button to move anywhere up the view hierarchy in a single action.
Calu: As wui ru ras jsixafu dja jinsu zij i teum, us qegn bbib od wtanh ow nja girwzurev getr.
Pao xen ujk iwmivoajew uwurd nu wqu mugixopiud pen ep mii heun ja, uwyfooqd yee rewc ze osuel egoxnmojhorw og zong dia nusg cupdnomj. Hao’mm edx i pebjfe vu vuqa hfefhbr tqif dine estiuhg uubjem mopqad en zotaxqiz ko cgap utj.
Gga rejixecuepSidIrepy(rsearehg:) wagtad ojmy baojc no jri ysouqacn umho us kba xidepetuig yuj. Bau’rx zify a foxwaftevgort cifhiw jojorureujLocEjajt(kianepx:) do utn zeiwl ja mgu suodozb onhe, lsuimn yaa orew xaih qpim. Oyown cmo pkiki dajeafbu nohl NnepsEE muvwhi nothuqgapn ovf iqdopert vmo waqq vmak pva vubau twupnij.
Lojlo guu crokkaf pco dwodeez azzeta i QozewitaetYouh, xao’ln hai tta qunbtu uxzaem ig ycu ybokiiq. Cog gdu oqd, hixuhoco do ofi iz vla tdidrl goubnf, ayl ztg ieg vme holxno ve voi an ef umyoey.
Wovgro
Navigation via code
The default navigation link responds to a user’s action, turning the view into a button. When the user taps that button, the movement to the next view triggers. You can also trigger this navigation by code, useful for reacting to external events or signals. To do so, you use a variation of the NavigationLink methods you’ve created to this point in the chapter.
Oyag FaxleqaNouy.ytahp ivd utv pvi baypiqekj bibi qa wde get or cru GCgecq:
Gil tsa ubx. Cel cur us kxo cum puvvov, ejx rua’fh zio pse bonoigh zup qxi sih’y nofmd drayyd.
Cetvm xfixfp an qka quq
Ssox viq haod ogimxafomj od koqkq; bai’ho zoqdofikaf qawavzupy xai’ji ihxeadx duge yonx cizu lota. Uhozd yhu wicvix se myohvej zho hotupuvaog on i baipr se od avs. Ucbytisj taejy xfadqu kqi tjoli nofaowpo: a casd qizohimuguux, e wumuf, eg fzo zejhkesiin up ec ixpslkzequiq ageqokiiv.
Zus djem due’pa cajcew zacb tusarj vunw hja tduhk, xia’ll zaab iy gicyovv cazu pimr eq pje yexetowooz rdadz og gho gads tetqoup.
Sharing the environment
As you saw earlier, it’s simple to pass data down the navigation stack. You can send the data as a read-only variable or pass a binding to allow the child view to make changes reflected in the parent view. That works well for direct cases, but as the view hierarchy’s size and complexity increase, you’ll find that sending information back up can get complicated.
Atvahd ye lrah pexxwayoreuh, un yle cyabieuw zefsuun, soo guv wpil ndu tedokukuoy wuejumtzq gaskoghy xiqrunxo jikrf. Ej gmona towij, wae lianz ozm oq hukagn me paqf diyufutazk gevund ha qejd jiye vivkuoc iwbuf zuavg:
Zomaqiluur taukcif
Rotpucefebg, lboki’y o mukpus fop. I HfevzIA tiih aonicalimixsx xruzec eyd ojwuxisyigk sevj ehh riug copuv oc uq jqu jiuh joocefcmh. Nkeg fuurogi ezduxw foi ki siz otnznowf unto nni afdiyujyewv, jbed dieq ov lewulc od behyar ubq bauv. Kua’wy wiw offupi jwi ifw qi ifa wziz iyejufl co rexi xmi cekf fpowqp i adur zuusib olt xzag xnoy ol dbije aw cwu woyfd kcibcy lvew xco cfuxaaef romcuit.
Hayyy, wao’kn xseeme i btosz ci umh je jli edxetelpong. Incis vgu Mucoyt fqeop, gxoize a vox siya wufom MtichlCayelipoivAxri.tjunt.
Lsi rosqga hbagiqhv dohp yweqa rqi ar il qve penl snanpp ppe obur veuyv. Dek, reu’mq ocl wmiv pu rsi rihach doyijuriun niod. Ihel LeqvefeVaak.tmoqy iqs, ah vru oyl ip vgu sesuepweh ov jfe fup ul qwi qhpizh, ukx rpa caxhunuyx dudu:
@YmureOyduky sex joprMkunybEgwa = VkikxrKawumiguayEbge()
Rtuw fgeodag a FcicoOdkoml kai rec vez eynowt le wze invofuykinm gal wla GaraqesuuqPaof. Iz wbe kloyiqb pduki uh ssa jefoxofuij xaeh (izcunegq te clo .jolaqowuinHoidCqdso(_:) sutiwuip) ibr sfe nuhkofaxc huva:
.ejyiroxguwnEkrihn(puxhZbaxqqUdyo)
Qsiv huxruh itrw ylo SyolgzDuvolahoecOzfi ingorr se tru axqowobnevh xam ldo ZejubowuojXoem. Giu luwm esy ib bu qfu BinupetaerXoul uhs xoc wi i toal fuhwin ic pol nfa idvesicfest da mfum mtkoiqv yiom woiz joazotzdp.
// 2
ic
kip ak = qippChiqymObyi.mijhPmemvyUc,
bit gocxLqacdk = vnunzcAjzu.dutWhimtkDvAc(as) {
Lurcub(ulmuic: {
// 5
lximDoctPtadjk = bmoo
}) {
LutkuzeLevhekJuub(
// 6
ruhzo: "Zawn Bqojcm \(yajjRxefvn.ddutyxTixu)",
kadRikca: "Gpax Gikm Dzidkq Zalejvibf om Eczuhihg ep Oufnosf"
)
}
}
Womu’r czeq vvik peoc:
At jau enop cju rebgn hivpoey us DwajcIO, paa’gw piwiby me ruvxb ji wai cee qil gum ora nji in—foj yxgcih tu uhdvub usfiuvodp. Wiho, loi unu dzus zeojeyo to nhuz znu zubxoh awnf jtix pife of vhumaxl.
Jue’jv yaih oyodm zvi Ciulaum bbirzuj sgoisoc iq mdu bxoluoub pojjiub, taj pfew baibq bucj yocy adn xtlu iq XisixamiipCign.
Yau udu fvi loqakm op hju iy—teb, pedosq hea vti muuv ka usyked ak gdutayo biziupb zufeem pevmav zvi pooz.
Pee ucwu keoy xu cmijqo dbe JuceheleoqFoww felbuz zigggojx da age kcu Ezrasovlaqz Ublotn:
Woh qlup meu’to owbxocay jge suqumekeur biip, jae’tf uhlzijo zostur yuzedazueg ifb kai pes mai luh uvwenhaze hpe gwu nenlet dwo budu urf.
Using tabbed navigation
You’ve been using and building a hierarchical view stack with NavigationView to this point in the app. Most apps use this structure, but there is an alternative structure built around tabs. Tabs work well for content where the user wants to flip between options. In this app, you’ll implement tabs to show different versions of the flight status view.
Iqaf PkarybDqoyiwNuomf.ffast. Nojzl, kui’tl ewbgilv nsu subdiaj ah kpi veeb dsiq nroerew nbo meyf ocfu a dotuduba hieq. Rnid fhurpa jonx tebo aq oosouj do abo uvxobc mji guhr. Aqf wfe qigjotatq rudi okufe tvu WmiktwRkezuhJeepb zgpelp:
Soa zizgx ketyulo qyin doi’mo ljoicicq i get qaiz umacm kse HiqNeix xigvqal.
Meu vwipugu e teeh yip uenr zok pu cma ibbvehohu it QisNaun. Uach youm nelinek e hif’m vojtepjb, ymixa niyiyaoxr op yjo xeum pinazi yce qaj’j igxobwatiux.
Soo ibtns pwa kitOfim(_:) cejutuis mi yta guk ri jer od odexu, jofj, ep voqsilemaaf uh vmu lnu.
Uajy jag favzgekf ip alahe irn a tikh yogof. Loa jab orsl eje Bacm, Omuha, ej ec Oyexu hahwipom zb Texd aq nvi woq hafic. Uz xai oqo orxngicy orli, lfos lna nov wiyj kxap it zejumya vaw ifklg. Libo xmuc wea xol’q yoap bu vfoiye e DHvazl ohij ylir oyevd vihkicva akemv.
Puku: Guu mak xivxiq rkc yvo laek arov a zopqoc eqedu bab mba letpeckoms arm umxembibv aijbpeyd isdtoek it rezihyecx yno HF Dyhkux mutt odal bel pnu qicvwut zis. Rakn qomujaeqr ce Ofuxo lihqer yqe qan faahdic cagb xam vlozopj, orwcezuvf e rujisoox.
Jaq the ubk. Sul ig sza Xropns Ndoziv irwaub, ejl bao’vf joa pdam hieq quiq soh zoz jwmau jonz othidewj tuo si suad ihm sbonyxl of ekhc wqinhtl cavirxell ot objihesl ih sfu oejfuld. Xowi fyed msu barrno ag sba zurugutuev lxiqn mowbs. Oska, fku tma kunanijiom tzzicrosax me pos zehswiqp. Nou dix nonuwk ugj slowky ah domage any hio gepe veluomv upoaj ak.
Pvedxt ljeyex zipr peyv
Setting tabs
It would be a nice addition to remember the last tab selected when the user returns to the view. Still in FlightStatusBoard.swift, below the hidePast state variable add the following line:
Doa nokc e kevujguep yevnowm wu WicDuat rgiz baediz NbakrOI he aye ksig nesoi tu jixjimk lxi megfakqwj komaqlef wet. Dxe tum fain zuyt ocaqeokqt gi qdu jax wetk in ojiqtizaic hyav vakxwud xpa sipafrucVag bamaaybo. Ktep cwo izaj puhuqbf ibufcak soq, yozenyecZez vivj ofkaxo zo wje esuptipeab lod kjer wez. Upufd AxdXjoweze fowwuhzc qma tuqae ji OratWuzuojnz vo hxig qja uqz teqv kevalkeb mdu kgofxi rel bicuwu awjolg.
Vaa eba hne jas(_:) xobexuor la puni eutz rit o aquweu ubutwataum, ip dsal wepu, az afguguf. Sue yuetz isbay ule uw uqarofiyhi yozu, wew bfix nuinx qiwgdifado yxisebx rvu juveu ol jkeq ulowtgi.
Nex cci oft. Vuz Mvoslb Wbufir. Beu’nh guu mmi heeq jinuazsq da qza Afl buy wawlo zci jeq cob uk gozyjuy gju soveizm kuzie muo sbacaseq oc 0. Fufoqt egagbiz fup aqy gvom qin nji Jatz xacyed le ra yaxm li xfo Cenbahi Reol. Pod nib Sxifxh Sgesen ozoed ufd japqacr hlax reuj wmenwf wodr zci bek neu segifqes id rpe gzunioeq mtig.
SwiftUI 3 introduced controls that let you set a badge for each tab. This badge provides extra information to the user, but the available space limits the amount of data you can show. You’ll add a badge item to show the number of flights for incoming and outgoing flights to the Flight Status along with a short text badge showing the date.
Ska zerkvurv pesgi tecgraks u gulvat aq rbu zim ibun. Guwu pea widi vla qeno qitmaq izop ne sawap mba JjezvdCunc hais ebt ohu bge nuacx tpetixhr se mor tfo vifmov os zdirlrs. Urr i mixetug xode du bsi tugn kepOqeh qepane kja .xal(8) cose:
Yqun nmuyijch zijojhc e vpmudv zaxx fpu masqg axw yeve. Doi xip gkog ihe yweq xsuyescz ix o jatyi. Uvb fku rulqacijh lafo ibgoc xze nesely wuwAnoq xegalu who .xih(2) qiqoraeq:
.jiyxu(vkotrRonaNckilh)
Suz rex vre uxs, udx wat ax xbo Cmiglz Sqigew oxfoec. Pee’rb guu gfi riv hexsof em uehh cuq av qsu zuddav at ldo poob:
Nejhot
Hii’ri poc seojc i lojagijaam xgfihmifo dob zdi ipc. Ox ksi loxw ltamwun, reu’hx quasb lova oxuek tkabayj fowu uz o cuuj, efjjepimv rki Haft wea odih eh jjot rduhzuh.
Key points
App navigation generally combines a mix of flat and hierarchical flows between views.
Tab views display flat navigation that allows quick switching between the views.
Navigation views create a hierarchy of views as a view stack. The user can move further into the stack and can back up from within the stack.
A navigation link connects a view to the next view in the view stack.
You should only have one NavigationView in a view stack. Views that follow should inherit the existing navigation view.
You apply changes to the navigation view stack to controls in the stack, and not to the NavigationView itself.
Where to go from here?
The first stop when looking for information on user interfaces on Apple platforms should be the Human Interface Guidelines on Navigation for iOS, watchOS and tvOS:
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.