How can I cast an integer to an id in iOS

Viewed 12511

My code is something like this:

[request setPostValue:employee.empId forKey:@"empId"];

where employee is a "POCO" object that has a property empId which is int, but the method is waiting an identifier.

I've tried already sending setPostValue:&employee.empId and setPostValue:[employee.empId] but still getting errors.

Can I get the (id) in any way? or must I create another object from the property?

2 Answers
Related