Skip to content

Instantly share code, notes, and snippets.

@V8tr
Created August 2, 2018 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save V8tr/f2a45c4bc2cd443a43019851df44cc11 to your computer and use it in GitHub Desktop.
Save V8tr/f2a45c4bc2cd443a43019851df44cc11 to your computer and use it in GitHub Desktop.
Refactoring Massive App Delegate using Mediator pattern. See blog post for more details: https://www.vadimbulavin.com/refactoring-massive-app-delegate
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let mediator = AppLifecycleMediator.makeDefaultMediator()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment