I need to pass a parameter to IBAction (but it has only sender(id) – UIButton in my case), so I’m wondering if it possible to convert description of some object to an object. Right now I’m passing parameter as button’s [titleLabel text]:
[[button titleLabel]setText:[someObject description]];
And in IBAction I’m getting description:
- (IBAction)AddToCalendarEvent:(id)sender {
NSString * description = [[sender titleLabel]text];
NSLog(@"description is %@", desc);
}
And now I want to convert this description to an object. Is it possible?
UPD
I’m dynamically filling table view with cells. Each cell has four buttons and I want these buttons to keep some object as parameter to pass to IBAction.

I think the best solution for you, based on what I’ve read and currently understand about your problem, is to maintain an array (or some other appropriate data structure) of your buttons on your View Controller. Then, in your action method that each button calls when it is tapped, you can search your array of buttons for the sender of your action method. Then, once you’ve figured out which button has been tapped, you can use that to then find whatever data you’re looking for in your data model. You should apply this solution to your situation and it will probably end up looking a bit different, but the basic idea is sound. You should avoid maintaining state in your view (in this case your buttons) and it looks like you’re approaching that from your description of the problem.