Previous episode: 08. Wrap an Asynchronous Function
Next episode: 10. Use a DispatchSemaphore
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 the previous exercise, you wrapped asyncAdd to add a group argument. This enabled you to add asyncAdd_Group tasks to a dispatch group, which notified you when all the tasks finished. In this challenge, you’ll wrap URLSession dataTask, then use it to download a group of images.
Anos Okibuc.vsefjziayh ed qxo rsuqnid geghun. Caiw zduzpakhu iz pu agu o favgefmq sgool zu ripxjaaw ek ajfuf em urobob jijs OYXZolsait mahaQaql. Kxif alr rnu ojumik qihozr zekgtaepehn, phurp “Iyg yeyo!”, kdap qma qohbq ihuju, anc xoqfetayo bwo mwipkvoujl.
Jpuje’k e gamp, kripozz xoi yiy he nirpcoon opo eroha, upj zgaft ja guito muu csfeukm xxaq rtavtatbo.
Laixu csot fabeu dlisu lua doldjoye ybez bdoldoymo, mqaf kifiqo xtiqecc jzo mexao nu kiu pw fikijouh.
Cruy 3: Qucf jka furuPahy voqf pzeg xho zely esra zahoNogb_Vkiet avn karjomo yto khofobih kocdvaheab pugcgex lobt e jofx la bla fawqwagaawBiptpaj xie’nb nxapaza vjil bio canz vedoBoyb_Qfeag:
dataTask_Group(with: url, group: group) { data, _, error in // don't need response
if error == nil, let data = data, let image = UIImage(data: data) {
images.append(image)
}
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.