iphone - passing an object on an UIToolbarButton action

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-03-09T18:08:32Z Indexed on 2010/03/15 23:09 UTC
Read the original article Hit count: 340

Filed under:
|
|
|
|

Is that possible to make a UIToolbarButton pass an object to its target by using some exoteric method (as it seems not to be possible using regular button use)?

I mean something like

UIBarButtonItem *Button = [[UIBarButtonItem alloc] initWithImage:buttonImage
  style:UIBarButtonItemStylePlain target:self action:@selector(doSomething:) **withObject:usingThis**];

I know I can trigger a method that will launch the full method with the object, but for the sake of elegance I was trying to minimize the code... I suspect it is not possible, but as you guys out there are insanely good you may come with an transcendental answer... who knows...

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk