Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide action button #22

Open
syrakozz opened this issue Jun 19, 2016 · 1 comment
Open

hide action button #22

syrakozz opened this issue Jun 19, 2016 · 1 comment

Comments

@syrakozz
Copy link

can you plz add the ability to hide the action button compleetlty

@sagarscript
Copy link

I Agree Big Time, I have my action button that SHOULD only be visible to logged in users, guests shouldn't be able to see it as they cant use it. As a work around my action checks to see if the user is logged in before button.toggleMenu()

... I have checked the source code and have found that there are two ways to fix this very quickly...

Manually change

    /// The button that will be presented to the user
    fileprivate var floatButton: UIButton!
    /// The button that will be presented to the user
    public var floatButton: UIButton!

this would allow you to hide the button like so:
actionButton.floatButton.isHidden = true
and show the button:
actionButton.floatButton.isHidden = false

Although when updating pods you would have to re-do this step each time...

A better solution would be for the developer to amend the code to include:

public var isHidden: Bool {
        willSet(newIsHidden) {
            self.isHidden = newIsHidden
        }
        get{
           return self.isHidden 
       }
}

I hope this helps users who want to hide/show and also for the developer to easily add the functionality to the pod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants