Skip to content

moflo/swiftui_hamburger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI Hamburger 🍔

SwiftUI implementation of a Hamburger menu

Description

BurgerMenuView is a SwiftUI that presents subviews and a popup 'hamburger' menu.

BurberMenuView wraps the subviews with a dynamic menu and binds the isShowing and currentPage states.

This demo creates two sub-views (page0 and page1) which, critially, need to be cast to AnyView type structs. The Pages View then dynamically presents the subviews, based on currentPage state.

This demo has two fixed menus, but can be easily extended to support multiple subviews and, a better menu icon.

TODO

  1. Refactor into a Swift Package
  2. Add dynamic list of menu items, likely as a stuct input type

About

SwiftUI implementation of a Hamburger menu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages