Skip to content

Ramotion/blob-menu

Repository files navigation

BLOB MENU

Swift UI menu library.

___

We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Stay tuned for the latest updates:


Twitter Carthage compatible codebeat badge Swift 5.0 Donate

Requirements

  • iOS 13.0
  • Xcode 11.4
  • Swift 5.0

Installation

You can install blob-menu in several ways:

  • By adding the source files to your project.


pod 'blob-menu'

github "Ramotion/blob-menu"

Usage

Blob Menu

  1. Create several menu items. You need to provide at least one image icon to initialize BlobMenuItem.
  2. Use these menu items to create a menu model BlobMenuModel.

public init(items: [BlobMenuItem], selectedIndex: Int = 0, isOpened: Bool = false)

  1. Finally, use the menu model to initialize BlobMenuView. You can use this view in your layout.

Example

extension BlobMenuItem {
    static let all = [
        BlobMenuItem(icon: <#Image#>),
        BlobMenuItem(icon: <#Image#>),
        BlobMenuItem(icon: <#Image#>),
        BlobMenuItem(icon: <#Image#>)
    ]
}

struct ContentView: View {

    @ObservedObject private var model = BlobMenuModel(items:  BlobMenuItem.all)

    var body: some View {
        VStack {
            Spacer()
            BlobMenuView(model: model).padding(.bottom, 30)
        }
    }
}

Configuration

To configure additional menu parameters, use a custom BlobMenuConfiguration in the BlobMenuView init method.

public init(model: BlobMenuModel, configuration: BlobMenuConfiguration = .default)

Right now we provide only color parameters. If you have ideas on what else should be configurable, please create an issue with suggestion label. For more integration details, please take a look at the Example project.

�� License

Blob Menu is released under the MIT license. See LICENSE for details.

This library is a part of a selection of our best UI open-source projects.

If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com

�� Get the Showroom App for iOS to give it a try

Try this UI component and more like this in our iOS app. Contact us if interested.



About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages