Implementing the UI on iOS
We're going to leverage SwiftUI to build the UI for our iOS app, and we'll basically mirror the declarative UI in Jetpack Compose from Android.
We'll also use Kingfisher
to load the images, so let's start with the following steps:
- Update the Podfile by adding
pod 'Kingfisher'
then runningpod install
. - Next, update the
ContentView
, as follows:@ObservedObject private var viewModel: MainViewModel init() { KoinModuleKt.doInitKoin() viewModel = MainViewModel.init() } var body: some View { VStack{ Toggle("Filter favourites", isOn: $viewModel.shouldFilterFavourites) ...