Create a Pokedex feature inside the BYU mobile app using SwiftUI.
Note: Use iOS 14 for the minimum target to take advantage of .onChange() and @StateObject
- Create new branch off of dev
- Create Storyboard and UIHostingController to get to initial SwiftUI view
- Create an initial SwiftUI view
import SwiftUI struct SwiftUIView: View { var body: some View { Text("Hello, World!") } }
- Create a storyboard and place a "HostingViewController" in it
- Create a class like the one below that inherits from UIHostingController
import Foundation import SwiftUI class UIHostingViewController: UIHostingController<SwiftUIView> { required init?(coder: NSCoder){ super.init(coder: coder, rootView: SwiftUIView()) } }
- Assign the above class to the storyboard HostingViewController
- Create an initial SwiftUI view
- Display all Pokemon from Pokemon API in a list
- display a nagivation title
- be able to search all pokemon by name
- each row must be clickable and use a navigation link to navigate to detailed view
- use a list view model to handle searching, client calls, and other non-view operations
- use the codable protocol on model objects with the json decoder
- use @Published property wrapper to publish changes in model object data to view
- Display an individual Pokemon in a detailed view
- display the pokemons name
- display the pokemon's image
- display the pokemon's abilities
- display the pokemon's types
- use a detail view model to handle the client calls to get Pokemon details and other operations done in your detailed view