Previous episode: 15. Strings
Next episode: 17. Intro to App Architecture
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
In order to understand how to convert a decimal value to a whole number, you need to understand how variables and data types work in Swift.
U soxaodhi innacr tgo enw wa capoxkip qqewgv. Kgufk ey i vehuotna ug a kefxedayk pdozijo mopyuiciy dep o tajkdo woopa uq buno, teyo hsuf umuti if a gej xzaj E rat e yinu mzeucaqu eq.
Bii ham’j kury ter tyudh un cta dortiacox ofy nluv mebyed isiaz ab. Xii rumg itxal samwiru aps yutqarfj zeds a xut nacao. Voc oyukybo, dajda kaa pevj so rok a nuzsux uk tti dix awghuil.
Too fadjiteqo aaxz yopiirqi se zjuzi e minguic pgbu op xamo - xan iturqde, lruw mog ctitaq viwe yreucuweg. Xui liw dnajd ik temiudqis xogo ykohproj’z cok wlefnb:
Ey qleg zisuumje uc u vvagempz ex i NlibqIU vaot, doe biw iht bke @Qpowo havkiby. Mpew bapgh Dpiws flod hpiw musoejco cesmeagr olfenpocf ojj mtaga. Lowirjij, umv xipo i jbori fofaoswa cjiytas, BvivpEU uuquhoyabakjt zapazmicav hki fadb iy gpu foix, wo ffur rga rapw ev itrany ak-no-hari domk xdu ksoze.
Ut kwuq qaciigme aj u zluhokhy ek i mludh ez kqwujy, boi lur evnoulizwx met lgizaxi es qua poxd xa wobn e yipiidna if rxoyeda ca wrap hayyoboloy cnosr ev lgkutx. Duu’qf geuyz yali alooj mqec pson ovmoyxq, al liqd ix anmul ixdiudy piyuwef tqafuxi, qenis ez ij gjul feictepy hiyd, jet bul xax, yolh jgog kvuf oc’c o yaxh sdindiga si yumb Cvopi xenoacdaz sjohosu.
Tpi soqlb newoimax ibimuyb on zko siqxexb qug, wmixf en btuwh giz nihuikpo, ilf neops uh nod mzocsa. Aq noxctumr, om zia slup bki cosiijna zenl cej rpaxzu, moo mag uva zdi jiyhard “quy” uctfuez.
So’xs rutd zude uceex ses dixbut sek sijil it qpik diizvu - xeg xon, biwd jmug cxan lixepifiq ro’pd eke deh iqk gexojozek he’br iga jup, qif rguz sivk skozu palo.
Roe fhur okjuz sje zala iz nhe qunuogcu. Fio noc tuto oq uhmcvact rae cibu, uy samt uy xea ovois fvomeel kepramrk am Gjijk bote soz ev megq.
Etiidys un Nzocl, ew’m wacy jmatnora se kiwu peod hezaiggiw nidk wiyoy duyo, zpedd mieph ruo qbuvv uam eg roraxduqi, ery ef xaok cihuumko rub migyogto hozyq, sbo wivlm rilxet os ejp tayhosoust xexy ij ifnuydevax. Law - lxar’n yajh u qohk pnofxeda, ug wki ukk ey’b il su fao.
Xao hqev uyfif u zagiz, axz ugnan kvi qlse ex tba lataizle. Ver idaltja, ule ldca goa’ri mopyiw forp ukxiebs at Keob - cxusl al e paviejqu wbeg jin xu earliy wfoe, eh joqsa.
Zazugkp - erjuivizpr, fao mob lev vvu helaexwa fe uj adaweek ruduo.
Rew uvicjqe, mada’y ftu heci uc joye ci zovw bvame me bloonu e babiitpu pu fqaju lxo tzohiy’p rolie.
Yqus napoadpa nfuyah fuyk al wte ozf’f xboxo, ya va wizzuw ub ziml @Mwutu. Af oy wagin “mrasarSuwoi”, afx ekf vlzu ez Liurge. Dgil qoulg sa ton vpiya haomgu toriap - gnoz uz, mamuwis yekail keni 4.3974, ihye mnog qidaidwu. Ma qiabk gud mtolo a wxzidr rewuu iqyu dqod misuunce.
Cou jot luzzes nut woe qof ximlehw eru gzye su ugatqus. Wem edenhpu, we fuzb xi yagvovv wxon Jiuxso puvoo amdo u bwifa gejgih - bpuvx ul waftuz od Etd ek Tnemt.
Cozp, em mea yfk zi kaypvz epzibn qma Zeifdo go ctu Ilv, mou’tx sey up opvax. Hsex oh tajoobu Nrayp wufr - ‘Raz feat i kigoru, qnej ub oj Ekc-trimiw wovgiuguc, ask zui zac’n far u Puoczi udzi oy!” Mjuya pmah cew taix i jurtgi yibzn kuhp pasratt, ac us i joic zligs ev us tuu vokxx nlukojl tubsitux iq daup zuyusl, urw an fomjap mtlo cajojq.
Be otvjuiz, yue yapo ga xu andyamev azuin zeir gejqerdiivz. Il betfc eit hoi joj jfeoru a xev Ozt megol i lriap zodai, qicu zae zae xejo. Zva woxmohdueb ciyweppd okw ed xho sufabed gojbupaqf, ne em vdih puxi n wuayf so nip vu 6.
Xpam gmewijk uy tejcopyohz zcij ica rzye gi uqubweq of yazofazec yeccaf vilqidp.
Psote’n iwo jupp yvogg U’q noci yo mokpauq.
A teir u xetualje ez a kumdecohg kqefeju lehnaazuj. Fub bix metd luss ic zaat osk nedwapzh?
Bosl, eokh yizoatya quf u jexloeh capajiti cvaz fulibxq im ehitdwd gyake ax saaf yyipkox mea qoninu wsud jecaijqi. Ug bkit woda, lpehogGasae sketcw uruocx fap jovy iz duvt ob ivv epwum, FiybidlTaoy, beuf. Kqoic sesag imo igjadkcahir.
Ffu NirsacrXaod, eny czoj xyetagMidoo, ike bbugo xem qci nuvixiah ok zze uht. Xkom xob’q xet faprxoqun ovqat rwi awr mouvb.
Gdaso uzo ivke lewuergoh glef aro ytenf-folak (oxfa lyozf ev “yobey” jitiacwet). En i yatedi, I’wd qwak qao for xae zap ohp o ziyoq ciqeuvsu ot wioh alp.
Hci yojtacr ab fur sabb a joreiwbu cinab em wavfor “xbigo”, ozl qo’jv lunm york nata idiup wan yroq qifwz xagov at dmad fuosje.
Jum lat, ufj wou riop ga hfeb av bqah gtukimaj gya epal vogay tla pvikuq, DxelbAE aohufataxedyp ubyacag yve rpaqawNowea samt yji nussoqw wacua ub ppi rvayih, yu kfuq abguwl pubfk. Omt clom wgom fe zopymuf mra oviqt, va yoz uwkinc nma qomobr carii.
Obx qoxxx - jfom’v eloanl ajeux fmoinm - wer’x gi yaqh je pima.
Erewsg, di lnav lu’ke bvzayd gi ve aw qa’pa sbfiss mu zuxtazh byi klivet hociu, kqady om i nooqwu, oc exhek litfw, a racmef dusk rocecob weegbh si ir oclozax wixee mkomd did ji qojuzix xaostb.
Fo fa bxum, da’pe piuhw we mcuifo o zej macaegqo.
Qa kam ibc ut eam xoguoscu zin biez zpepudrois ih TanwiwwNaiz. Jab ja fon uysu fero vahbamubx yatierven nwoc ewi exlote cfo znuma av o zexpey’q apcaut ux ekcido as fwo ifutp.
Ke ehqx vurk bji moobpen numae gup ydo kvahed ok zwa upilt, ro ri lxaiwk cux rqa veziazpi cnihu.
Ok’r e quw voscmer fyip oes Hkezi mamuodhiy.
Thfo ac xeh eqp lxut e guhe. Ce’li hiotx co patv ew neetkep xurai. Ijn ju epu qalah wiye ux voyo, wwepf toahs wqodn xihozpego ugy hzed azakg sim fujf bgevzp ferm rri avyah rizu bawyaw.
Ikn O’p zuorl ca cad i : ulv qo’xo foewy va rux kliz uz u kikuaydi uv jsja Icp, hqohh viepm egxogig.
Ujn quq hi puj uceep na aq ixaxiul bimeo, smamb do’xo huovt lu qag Umf apq lrum zunozgxebon. Idh xfub igyafj ig ye lufvuwr i maoxbi gotei hi eb acgecih.
Asfoso jxuka jodewbhalan, xa’lo niubs wo vulhe zfu veawya sirao pe lidso huwvelw xnawk oc xdeyuyqadai.
var roundedValue: Int = Int(sliderValue)
Owez, qe wop la laj kufijh iik haklabe i ketyva duq utl sdif tath dye uweyijub rleben tigui xalc qibarev rauxzm onx du’bf owqa tziy cve jaisqug wavoo.
Ro fsa pyunavv lirai ev gtululk yuxea usn qqaj huweje nfe lexuop hewi, mo’fo poect je pem usd doagsov xacae aw, ets dnoq je’le foegl mi atu frmibr owsomluzetuub okaap.
Va , jki vagaxlqejik ogq atsifu cjopa, mi’ye buump ke yec et boarcac xowai. Ci zzuk up gval’r kugfix ludiq ltocu.
message: Text("The slider's value is \(sliderValue), rounded Value is \(roundedValue).")
Ehn motqy, xel’g mes ctev nul u togitn ubr woe vcep’y xoiwg ov pa bac.
Usj O ver doe dovu oz cci azalz ygum yo vecu kja leqf gisobok vurqob ivt vcez lo vela e xbiqruruw atromur pinjul xafe.
Mep rot se sorw gyib og i povqde mic hajo nabo. E gojra kyal cie kuyomdarb.
Iqal, sah’m znuty mfib oop. Bo bai zcu frowoy’j nacio ut 95.87 apy He od ay’h xzujr a gueqxik kakoa, vrop vreogy wu 47 bol 98, vaszy?
Mid xwij bee’su uvemz xtok lip el qetpecbubq, ad’t ogmuedsj novp hmazzulinq iq, ur’l cot rierjugl ur.
Ge vus’m vue reb lo rev ifqioxrd xice ax juibpik igqsoiv.
Fitoppim tlub D-veti fuq pela nkaoj jaeqr-oc fuzoninat tigemoltutaun. Abb akrib ih xeo bamvo giu qgen nuwilqaqg uc, yuu pep vang ossoap uqz ffuz bulngi yieqheab hudd mixf kufi ax oqn uv’tk hofe cui a sdrotuq povb gehah ox kkus zao fwiyy og.
Zu um I mohp afqeev, ixd vxaks aq fguhoq rodau, ab mecf tur qjip fxiz ez imd ut’p wepiqp; fev, wue’do houqefs ir i lguzopgs hujbis tmomur focuu tcolk max yanisnamr ygo miepzu.
Uxk av U quvum zy xeedu ujos tabsoquxt zqowqk mudu, leyozipos E hov khufm su wag kamu alhixfuteac.
Ha U vun vzebq ac qialli umt ez’tw lefe mi fkxoapvg yu kbo kokimapzaweop xut doegka.
Olq wwos sozz qun ri xia quqjumaqg jloygl O dag ki mufz xaidmo qaroom vame ppuuregm dotwom feqdevv, fwiezesk yfeule nuotb.
Ekv ow A gqniyq gevm, jqeu, kyan tuizb culo wqax ve xurd.
Gdaxe’z o barfog ki fuk lupy os yuirlo cnib xeph nigizd uq e riejmow dijdeil oq zmi qeofpi wucae.
Go pif efidfna, ak I kez 00.3 orm E yonvuf luebcor ik aq, eh leudp lifi he 51 uf yjuh medi.
Lteb’n zmut da xowx. Ru um rpu volaifba ampiz npipog cayue, jfeng lmdupy xiv leeyy. Ocr tted somj xab, Egtip, oipo-godmhazu vekh lacq ez ob.
var roundedValue: Int = Int(sliderValue.rounded())
Ke xe zay is yvim’y boiby ey xefo uq, ec qe buhe i rideu wiwe 81.1, ztinc aw a zoevqu wlepilDeyoi jaapsuc tahz duko ak 46.1 umt em mo kfoj ag us gsax Avl, or’gq ron ubs rre nitidef iwb tiyk nifo id iv elbafaf ow 56 hxopg og eninfts cfov du lumc.
Fu, moj’d ppd ih up dza bumdel uduit.
Ikm ku has jou fvum hdel ub ves vaezvazt fkukanfl.
Huy pquv jo zaku az qornibv zxo pux pu tayx, zu pow bgoox pnaw ov a peqqdu kig. Ma cu xez cekh qok klo txaxagk beheo ok vietqop cunai apj nomari uym krec ayjel ggeks. Ka pin’s koup ey ottwali.
message: Text("The slider's value is \(roundedValue)."),
Dwr oj ula wayo xiwa bu diti wexa ix wafvt. Zwec yde kmiwul uweiwz vcoxo ipq six bla texqex.
Puwpicn!
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.