In this session, we learn how to make network requests using the URL Session DownloadTask method.
We implement this by downloading an image from the internet using the downloadTask and loading that image in a UIImageView.
We also learn how to use the URLSessionDownloadDelegate to receive progress updates on the download task and update the progress bar and progress label.
Finally, we learn about some common mistakes including updating UI outside the main thread and also possible retain cycle.
Additional Resources:
Finished Code: https://github.com/EMacco/ios-tutorials/tree/URL-Session-Download-Task
URLSession DataTask: https://www.youtube.com/watch?v=xsfzGt7k0rI&list=PLgBVHL8joMCslhJPyp2Wzzh5ZO9bmRkK-&index=24
Error Handling: https://www.youtube.com/watch?v=sJWdYz40T6g&t=4s
Abarian: https://abarian.ng
Concurrency: https://www.youtube.com/watch?v=T0nbHBTQ5Ss&t=1s
Retain Cycles: https://www.youtube.com/watch?v=zn05jgp8VUc
Say Hi on Social Media:
LinkedIn: https://www.linkedin.com/in/emacco/
Twitter: https://twitter.com/Its_Macco
We implement this by downloading an image from the internet using the downloadTask and loading that image in a UIImageView.
We also learn how to use the URLSessionDownloadDelegate to receive progress updates on the download task and update the progress bar and progress label.
Finally, we learn about some common mistakes including updating UI outside the main thread and also possible retain cycle.
Additional Resources:
Finished Code: https://github.com/EMacco/ios-tutorials/tree/URL-Session-Download-Task
URLSession DataTask: https://www.youtube.com/watch?v=xsfzGt7k0rI&list=PLgBVHL8joMCslhJPyp2Wzzh5ZO9bmRkK-&index=24
Error Handling: https://www.youtube.com/watch?v=sJWdYz40T6g&t=4s
Abarian: https://abarian.ng
Concurrency: https://www.youtube.com/watch?v=T0nbHBTQ5Ss&t=1s
Retain Cycles: https://www.youtube.com/watch?v=zn05jgp8VUc
Say Hi on Social Media:
LinkedIn: https://www.linkedin.com/in/emacco/
Twitter: https://twitter.com/Its_Macco
- Категория
- Язык программирования Swift
Комментариев нет.