DataBasedViewController

open class DataBasedViewController : UIViewController

Provides a basic ViewController capable of perform data synchronization operations.

  • A view to be displayed as a courting, covering entire view, when fetching data.

    Declaration

    Swift

    @IBOutlet
    open weak var courtainView: UIView?
  • Prepares the ViewController to become visible. Checks if any data operation must be executed.

    Declaration

    Swift

    override open func viewWillAppear(_ animated: Bool)

    Parameters

    animated

    If presentation must use animation to become visible

  • Validates if data synchronization must be executed.

    By default, returns always true.

    Declaration

    Swift

    open func shouldSyncData() -> Bool
  • Data synchronization will be executed.

    By default, executed showCourtainView()

    Declaration

    Swift

    open func willSyncData()
  • Executes data synchronization.

    This method is intended to be overriden by child ViewControllers in order to implement proper data synchronization.

    By default, does nothing.

    Declaration

    Swift

    open func syncData()
  • Data synchronization was completed.

    By default, executes hideCourtainView()

    Declaration

    Swift

    open func didSyncData()