Q:

How do I make a message/method that accepts both value and reference types?

Like the question asks, how would I in Obj-C make a message that can take both reference types (object) and value types (primitives) as a parameter?
-(id) initWithValue: (?) val;

What would I write in place of the ? to make it work with both reference and value types? Or isn't it possible at all, since an int isn't a reference type

A:

You can't. If you need to do this, wrap your primitives in an object. NSNumber for example.

