Skip to content

ForegroundViewStore#1

Open
MSWagner wants to merge 7 commits into
mbuchetics:masterfrom
MSWagner:ForegroundViewStore
Open

ForegroundViewStore#1
MSWagner wants to merge 7 commits into
mbuchetics:masterfrom
MSWagner:ForegroundViewStore

Conversation

@MSWagner
Copy link
Copy Markdown

Per default, StatefulViewController presents the placeholder views above all other views. In case other views, like some buttons, should be above the placholder in some states, you can assign a dictionary [StatefulViewControllerState: Set<UIView>] to the foregroundViewStore property.

foregroundViewStore = [
    .empty: [button1, button2],
    .error: [button1]
]

You can also update the foregroundViewStore later:

foregroundViewStore?[.empty]?.remove(button1)
foregroundViewStore?[.loading]?.insert(button3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants