Skip to content

Instantly share code, notes, and snippets.

@ElonPark
Created July 29, 2021 02:52
Show Gist options
  • Save ElonPark/d67366d04182c1a9944dcd33c94c9f4a to your computer and use it in GitHub Desktop.
Save ElonPark/d67366d04182c1a9944dcd33c94c9f4a to your computer and use it in GitHub Desktop.
UserListViewController.swift
// MARK: - UserListPresentableAction
enum UserListPresentableAction {
case loadData
case refresh
case loadMore(IndexPath)
case itemSelected(IndexPath)
}
// MARK: - UserListPresentableListener
protocol UserListPresentableListener: AnyObject {
typealias Action = UserListPresentableAction
typealias State = UserListPresentableState
var action: ActionSubject<Action> { get }
var state: Observable<State> { get }
var currentState: State { get }
}
// MARK: - UserListViewController
final class UserListViewController:
BaseViewController,
HasTableView,
PullToRefreshable,
UserListPresentable,
UserListViewControllable
{
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment