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

eventhandling #8

Open
mpnguyenreply opened this issue Aug 28, 2015 · 3 comments
Open

eventhandling #8

mpnguyenreply opened this issue Aug 28, 2015 · 3 comments

Comments

@mpnguyenreply
Copy link

Hi,

I successfully integrated PopMenu to my project. Are there any eventhandlers for the buttons?

thx

@nghuiqin
Copy link

*Please correct me if I'm wrong.

For @mpnguyenreply question, I think it could be answered by the PopMenuExample.
You will find this code as below:

_popMenu.didSelectedItemCompletion = ^(MenuItem *selectedItem) {
NSLog(@"%@",selectedItem.title); <-- Here is where you receive the event handlers from buttons.
};

@pengleyang
Copy link

@baby03201 _popMenu.didSelectedItemCompletion = ^(MenuItem *selectedItem) {
NSLog(@"%@",selectedItem.title);
}; how to swift?

@nghuiqin
Copy link

@pengleyang FYI
popMenu.didSelectedItemCompletion = { selectedItem in
print(selectedItem.title)
}

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

3 participants