Skip to content

Instantly share code, notes, and snippets.

@BohdanOrlov
BohdanOrlov / ViewControllerLifecycleBehavior.swift
Created October 23, 2017 09:36
Swift implementation of idea that manny view controller can do light work: http://khanlou.com/2016/02/many-controllers/
public protocol ViewControllerLifecycleBehavior {
func afterLoading(_ viewController: UIViewController)
func beforeAppearing(_ viewController: UIViewController)
func afterAppearing(_ viewController: UIViewController)
func beforeDisappearing(_ viewController: UIViewController)
func afterDisappearing(_ viewController: UIViewController)