kxmenu
kxmenu copied to clipboard
Tag property in KxMenu
Hello, I find the tag property useful in order to use a single method for the different actions. I kept the same interface to keep compatibility.
Hopefully you will merge it with the main code.
Thanks, Dem
Hello, any news on this? Thanks
I'm not sure why the developer ( @kolyvan ) of this beautiful component is not active and not responding to this good change! ~ ~
However to @demetrio812, good change! :)
However I found one more way (without even modifying kxmenu)
in your action,
NSInteger tappedMenuItemIndex = [arrayMenuItems indexOfObject:sender];
if(tappedMenuItemIndex == 1) {
//...
}
Note, here sender is kxMenuItem.
Thanks @hemangshah, good idea! I thought my change was easy enough to be quickly integrated but anyway :)
@demetrio812 , Your changes is really easy (and understandable too), I appreciated it, but mine is just another solution :)