rechsteiner / Parchment

A paging view with a highly customizable menu ✨
MIT License
3.39k stars 419 forks source link

How can I hide the menu? (SwiftUI) #654

Closed trevordevs closed 1 year ago

trevordevs commented 1 year ago

I am trying to hide the menu, and with little luck, cannot find any options other than the menuHeight, however, this is a computed property which provides the error below.

private var pagingOptions: PagingOptions {
    let options = PagingOptions()
    options.menuHeight = 0 <-- Error here

    return options
}

PageView(options: pagingOptions, items: items, selectedIndex: $selectedIndex) { item in
//
}

Error: "Cannot assign to property: 'menuHeight' is a get-only property"

How can I completely hide the menu?