Question
iOS guidance please... iOS- Swift (not Objective-C) Utilize MVC architecture, Swift's Codable protocol for parsing, Coding Keys and the SWAPI (Star Wars) API (https://swapi.co/documentation) to
iOS guidance please...
iOS- Swift (not Objective-C)
Utilize MVC architecture, Swift's Codable protocol for parsing, Coding Keys and the SWAPI (Star Wars) API (https://swapi.co/documentation) to make a request to obtain a list of all the characters in Star Wars Episode 5. Display the list in a tableview. When the user clicks on a character's name, he/she should be sent to another tableview listing the character's name, gender, and species. Handle errors gracefully.
need model classes, networking class, and view controllers(tableview delegate methods, networking, etc)
//Comments explaining code will be much appreciated!
This is what I have so far:
class Character: Codable {
var name: String = ""
var birthYear: String = ""
var gender: String = ""
var homeworldURL: String = ""
var speciesURL: [String] = []
enum CodingKeys: String, CodingKey {
case name
case birthYear = "birth_year"
case gender
case homeworldURL = "homeworld"
case speciesURL = "species"
}
}
I'm really stuck on all the other classes for MVC architecture. Thanks for your help!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started