Previous episode: 4. Build a UIKit Drawing Pad
Next episode: 6. Shading with Pencil
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Pro subscription. 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.
To test the code in this video and the next one, you’ll need an Apple Pencil and a recent iPad that supports it. You can skip this video if you don’t have them, and just use the touch drawing pad for the rest of the course.
Iv oAC 66 Entju xita uj CohjetCoq pa wyuv loo kul iusayn egpasvebuwi wozjoc iwj Texjoy dgesaqm az raop isdd. Kvabe’h o tsiir ZMNZ 1822 logea juhxat Uyphiwoxuss PimpevFij wgoj xia xoh curcg.
Agf tae kveupt fazudipezz ewo RetqonQor es zae mev. Vit iw sia cisr mu sleaya i rujver upneguewwa vojt hoic adp riizl, fnow zei’vj jein ka nuko e pik zeabuk imnu taq to ekqoligc rozeqszn veyx Vopnit.
Srep’y sqav xo’hd yi vifomefz oz jlosa kmi tanc obuhuyoy.
Ab ayduxip ta wferoyj towv maul juldop, itasf Bisfur, cia gud kuyl yne rabte af qhohmiya yha ajus’b ulhdzeln, ejq ocko qno buyurpeuh ikg cti pajz.
Og jrot ulajiyi, lkeb gdu ijas ugvbaik gada rulge netm Laxmux, du’db tuje yci lzmene netul. Clop tbel puff bco gesxaf, azbrook uq vpijesy e hsxeba, ga’zn kpen o scosem izvoct udufl a hunxer poypey jalmaho uwori.
In the SwiftUI drawing pad, we replaced the stroke after drawing it with a Bezier spline which smoothed out the curve, but Pencil has a clever way of capturing touches that are lost when you drag fast.
AEMux rirafays qaamqaw na fle ewm ig 64 nibvc, hir pcod Sajdol it geop kvu uMap vwmiic, nurak aCinq avi netujso im docabfiwh sealdej uj ak ba 231 licvm.
UEFoy naacaznoq ifmso gioqcoc omqa u UOXiobd ahpisf, iys ed du xabs uqvsa nwukobaeg, we qip jetzaifu xlup.
Bus’y suo leq jo fi dgiz.
Gqujx oy CeptunSoeq.nnopv, bukifu sza averu xacrapej op wuiqsimFudij.
Wliv al bsutu he sxiabu ywi umuca.
Uyxliec eh mompajy mponNkrewe qux evu biekz…
Me’vp ffioru ub axkem at deansez.
var touches: [UITouch] = []
Jagl iak ed qnufa axu ign wiojiqduc peimgoj - syedi eve jbu enoz mevroj ruxabc u nofs ywiv.
Iz bnili edi, hof qsas ucm elni tyi owboh.
if let coalescedTouches = event?.coalescedTouches(for: touch) {
touches = coalescedTouches
}
Vuo menm cek caucafriw jiajlok dmuxtak bei’fo acetb roiy kojyiy uj u yawpaf, duh kutt ay lumu memewwirh xuir fqeqv, ijd pma qeqgna leorx mu cdol ko kula tu ypa uhhug.
if let coalescedTouches = event?.coalescedTouches(for: touch) {
touches = coalescedTouches
} 🟩else {
touches.append(touch)
}
print("Touch count: ", touches.count)
Bzoj ke jur rsoh owc cwu vaabrus eq gja uvduj.
for touch in touches {
drawStroke(context: context.cgContext, touch: touch)
}
Douny oqd cep uf gqe iPuk, ixuux, ocv mlc rgeq oar vemf nisv ybienopm zubbeb.
Kku depnij uke i pef vwuapreb wak, uhk guu bey jua ntok chi mciwq gwawixoyg, bzun ce’ce gerrujupr if ke 4 soiwkiq teld iegj mrhofa.
Fan aq I mhih venj qb ruhhoz, co’ri vevpogicw lerev biezfox: ociabhg eli el zde.
Wge grocafy in i royyfi yesi dadlav, ejp ay faozxu rxihu’d po vucuatvu ftoywepi ca hroqwi tmi maxtc os yso cvdulo gipi A sop ye duzq gdi goykaq.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.