Giter Site home page Giter Site logo

menu's People

Contributors

aksh1t avatar andyq avatar apollozhu avatar simsaens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

menu's Issues

Using MenuView as UIBarButtonItem

Congratulations on the menu, it looks stunning and I believe this should be a standard UIKit control.

I have been playing with it in one of my apps and tried to add it to the navigation bar as UIBarButtonItem. The menu shows up correctly and it opens up as it should when tapping on it. However, it does not let you select any option.

This is because options are outside its superview(navbar) bounds. I am guessing I could override hittest and point(inside:), I haven't tried it yet. I just wanted to ask if I am missing something or this is the only way to go.

Thank you,

Theme values don't affect menu title color

Hi,

First off, huge fan of the project! Best menu option for iOS that I've seen by far.

This may be a me problem, but I've been trying to create a dark theme based on your struct layout in MenuTheme.swift. For whatever reason, the menu title (UILabel) won't respect the set UIColor.

I see that, in MenuView.swift, you have the following setup:

public func applyTheme(_ theme: MenuTheme) {
        self.theme = theme
        
        titleLabel.font = theme.font
        titleLabel.textColor = theme.darkTintColor
        gestureBarView.backgroundColor = theme.gestureBarTint
        tintView.backgroundColor = theme.backgroundTint
        effectView.effect = theme.blurEffect
        
        contents?.applyTheme(theme)
    }
    
    public override func tintColorDidChange() {
        titleLabel.textColor = tintColor
    }
}

The title label should always reflect either theme.darkTintColor (or alternatively, tintColor), correct?

I have the following set for my custom dark theme (in MenuTheme.swift):

public struct DarkMenuTheme: MenuTheme {
    
    public let font = UIFont.systemFont(ofSize: 16, weight: .medium)
    public let textColor = UIColor.white
    public let brightTintColor = UIColor.white
    public let darkTintColor = UIColor.white
    public let highlightedTextColor = UIColor.white
    public let highlightedBackgroundColor = UIColor(red: 0/255.0, green: 122/255.0, blue: 255/255.0, alpha: 1.0)
    public let backgroundTint = UIColor(white: 0.0, alpha: 0.15)
    public let gestureBarTint = UIColor(red: 255/255.0, green: 255/255.0, blue: 255/255.0, alpha: 0.7)
    public let blurEffect = UIBlurEffect(style: .dark)
    public let shadowColor = UIColor.black
    public let shadowOpacity: Float = 0.3
    public let shadowRadius: CGFloat = 7.0
    public let separatorColor = UIColor(white: 1, alpha: 0.1)
    
    public init() {}
}

However, regardless of what I do, the menu title will appear as UIColor.black (or something very similar)ย โ€“ as opposed to the set UIColor.white value. When I select the menu title, it will turn white; however, at rest (non-interaction), it remains dark and I'm unable to change it without changing the core code.

Similarly, do you plan on adding the other three layout options to your project? ie. Menu dropdown to:

  • Down, Right
  • Down, Left
  • Up, Right
  • Up, Left

Thank you again for the project! It added such an elegant beauty to my simple web browser project.

EDIT: Also, are you planning on adding disabled menu options? ie. When a user can't go back in a WKWebView, disabling the "Back" menu option.

EDIT 2: Since SF Symbols were released relatively recently, is there any possibility of adding those as a menu title or adding an SF glyph next to the left of a menu item? Thanks!

License?

As it currently stands, the code is released as "all rights reserved". Would you consider releasing under an open license to allow others to incorporate this into our own apps?

Adobe XD design

Can you please provide Adobe XD design as well? I can open the .sketch file with XD but some stuff are missing.

Many thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.