IOS UIMenuController UIMenuItem, how to determine item selected with generic selector method

前端 未结 4 846

With the following setup

....
MyUIMenuItem *someAction  = [[MyUIMenuItem alloc]initWithTitle : @\"Something\"  action : @selector(menuItemSelected:)];
MyUIMe         


        
4条回答
  •  醉梦人生
    2020-12-10 07:08

    ort11, you might want to create a property of myuimenuitem and set some sort of Tag. Thay way the object of sender could be recognized by its tag it. In Ibaction then you can set a switch statement that can correspond to each sender.tag and work throught that logic. I guess thats the simplest way to go.

提交回复
热议问题