I'm very new to Objective-C, I'm wondering if there is a simple way to set an id to be an object instance (which has synthesized properties), and directly get/set those properties like:
id myID = myInstance;
myID.myProperty = something;
Where myInstance is an object with a synthesized property called myProperty. When I just do:
myInstance.myProperty = something;
It works, but when I've switched it for an id I get the error
Property 'myProperty' not found on object of type '_strong id'
Do I have to manually make getter/setter methods instead of using synthesize when using an id? Because I do seem to be able to make the id perform the instances methods.
id
type to refer to the object; it doesn't know until runtime if the message will be handled by the object or not. If you want to avoid the warning then use the correct class pointer. – Madame