Kotlin/Native and Multiplatform Β· Shared Presenter from iOS | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1304635-kotlin-native-and-multiplatform/lessons/23

@macsimus
I saw you created a BaseView.swift in the iOS project to handle the showError. But is it really necessary ? I can even do that in the UIViewController.swift along with the onUpdate and isUpdating implementation?

Thanks for the question @sagarsuri! It is not strictly necessary to add showError like this, especially since this project has just one UIViewConrtroller.

However, if you have multiple view controllers in an app that are all showing errors the same way, having UIViewController conform to BaseView like this in a common file would save you from having to add showError in each of them. Thanks again for the question!

1 Like

Thanks for the reply. Now it’s more clear. :slight_smile: