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

Need to remove animation while closing items #223

Closed
sohail-niazi opened this issue Oct 9, 2019 · 3 comments · Fixed by #238
Closed

Need to remove animation while closing items #223

sohail-niazi opened this issue Oct 9, 2019 · 3 comments · Fixed by #238
Labels
Milestone

Comments

@sohail-niazi
Copy link

I need to remove animation while closing items, because when I remove actionbutton from view, items kept remain there for always. I cannot wait to have all items hidden with animation.

Kindly, provide solution for this and 1 more, if we can remove items from actionButton

@jjochen
Copy link
Owner

jjochen commented Mar 4, 2020

There is now a pull request for the first part of this issue.
I created a new issue for the second part.

@jjochen
Copy link
Owner

jjochen commented Mar 4, 2020

@sohail-niazi Btw. you can easily "remove" an item by setting it to "hidden":

let item = actionButton.addItem(title: "go for it!", image: UIImage(named: "image.png")) { item in
    // do something
}

item.isHidden = true

Setting isHidden to false would make it appear again.

@jjochen
Copy link
Owner

jjochen commented Mar 4, 2020

And it should also be ok to just use remove(at:) to remove an item:

if let index = items.firstIndex(of: item) {
    actionButton.items.remove(at: index)
}

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

Successfully merging a pull request may close this issue.

2 participants