Reputation: 6353
I'm using VIPER pattern within my Swift app. I need a function that is executed in a lot of controllers to open a cardViewStyle. I don't know where is the better place to add this function...
Could be a useCase? An Interactor?, common... I haven't been able to visualize how VIPER and clean architecture would handle such a function.
For now the function is into view controller, into presenter and wireframe, because is called only one time.
The function would be like:
//Presenter
func showLikeCard(controller: UIViewController){
wireframe.showLikeCard(controller: controller)
}
//Wireframe
func showLikeCard(controller: UIViewController){
controller.present()
}
Thanks!
Upvotes: 3
Views: 125
Reputation: 902
As described in https://theswiftdev.com/the-ultimate-viper-architecture-tutorial,
Upvotes: 0