Populate TableView using URLSession & JSONDecoder in 4 Steps

Опубликовано: 06 Ноябрь 2019
на канале: Mobile App Mike
3,547
61

Hey! In this video, we fill out a TableView using the PokeAPI found at pokeapi.co. To do this, we use URLSession and the JSON Decoder. We also update the TableView with the data, which can be kind of tricky to time properly, so we use the DispatchQueue and booleans to control the data flow for us.

Starter Project: https://github.com/michaelmiles1/JSON...
Finished Project: https://github.com/michaelmiles1/JSON...

Steps:
1) Analyze & Map JSON to fit your app’s needs
2) Create Structs conforming to Codable protocol
Optional) Add CodingKeys to create readable Structs
3) Call Decoder in URLSession DataTask
4) Populate UI w/ returned data

Twitter:   / milesoftweets  
Instagram:   / michaelmilestv