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

Change center button image on click on it. #43

Closed
Gagan6696 opened this issue Jun 25, 2019 · 1 comment
Closed

Change center button image on click on it. #43

Gagan6696 opened this issue Jun 25, 2019 · 1 comment

Comments

@Gagan6696
Copy link

No description provided.

@shipinev
Copy link
Member

Hi @Gagan6696.
If you want to change the menu button image on the user tap event, first of all, you need to update FanMenuButton model and switch image property to a variable.
Since you always know the menu button identifier, you can use onItemDidClick event handler, i.e.:

fanMenu.onItemDidClick = {
    if $0.id == "main" {
        $0.id = UIImage(named: "icon-name")
    }
}

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