This commit is contained in:
Ivan Smolin 2018-03-22 18:27:47 +03:00
parent 368b90ddc8
commit bfaf668191
4 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ open class GeneralDataLoadingViewModel<ResultType>: BaseViewModel {
}
/// Manually update loading state.
/// Should only be used only in specific situations on your own risk!
/// Should be used only in specific situations on your own risk!
///
/// - Parameter newState: New loading state.
public func updateStateManually(to newState: LoadingState) {

View File

@ -22,6 +22,7 @@
import UIKit
/// For internal use only!
final class TextWithButtonPlaceholder: UIView {
typealias TapHandler = () -> Void

View File

@ -32,7 +32,6 @@ public extension GeneralDataLoadingController where Self: UIViewController {
// MARK: - GeneralDataLoadingController default implementation
/// Call this method in viewDidLoad instead of initialLoadView.
func initialLoadDataLoadingView() {
addViews()
setAppearance()
@ -60,8 +59,8 @@ public extension GeneralDataLoadingController where Self: UIViewController {
switch value {
case .loading:
base.onLoadingState()
case .result:
base.onResultsState()
case .result(let newResult, _):
base.onResultsState(result: newResult)
case .empty:
base.onEmptyState()
case .error(let error):

View File

@ -50,7 +50,7 @@ public protocol GeneralDataLoadingController: class, ConfigurableController
func onLoadingState()
/// Called when data loading has finished with non-empty result.
func onResultsState()
func onResultsState(result: ViewModelResultType)
/// Called when data loading did finished with empty result.
func onEmptyState()