#1 Setting up Cocoapod, UIViewController and ViewModel - RxSwift MVVM Coordinator iOS App
protocol SearchViewPresentable {
typealias Input = (
searchText: Driver<String>, ()
)
typealias Output = (
)
var input: SearchViewPresentable.Input { get }
var output: SearchViewPresentable.Output { get }
}
Presentable
프로토콜final class SearchViewModel: SearchViewPresentable {
var input: SearchViewPresentable.Input
var output: SearchViewPresentable.Output
init(input: SearchViewPresentable.Input) {
self.input = input
self.output = SearchViewModel.transform(input: self.input)
}
}
extension SearchViewModel {
static func transform(input: SearchViewPresentable.Input) -> SearchViewPresentable.Output {
return ()
}
}