Skip to content

KevinVitale/FunWithEnums

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FunWithEnums

Use enums to define (and inject) your application's state:

enum AppViewState {
    case tabs(AppContext)
    case modal(AppContext)
    case alert(AppContext, title: String, message: String, actions: [UIAlertAction]?)
    case unknown
}

Easily transition to a new state:

context.proceed(to: .tabs(context))

A transition is represented as a AppTransition:

enum AppTransition {
    case present(UIViewController)
    case set([UIViewController])
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages