lynnswap/uihostingmenu
`UIHostingMenu` is a proof of concept that builds a `UIMenu` from SwiftUI menu content.
Usage
import SwiftUI
import UIKit
import UIHostingMenu
let hostingMenu = UIHostingMenu(menuItems: {
Button("Refresh") {}
Divider()
Menu("More") {
Button("Share") {}
Button("Delete", role: .destructive) {}
}
})
button.menu = try hostingMenu.menu()
button.showsMenuAsPrimaryAction = trueLicense
MIT. See LICENSE.
Package Metadata
Repository: lynnswap/uihostingmenu
Default branch: main
README: README.md