Is it possible to forward a property?
Let’s say I have a proxy class that has a member which has in turns a property called string.
I want my proxy class to have the same property also named string. From there, I would like that whenever I call the getter/setter on the proxy, it set/get value on its class member.
the closest I have come to it is to implement -forwardingTargetForSelector and switch the target when needed but it’s not clean nor pratical (it gives warning and you cannot use the dot-syntax)
You can declare the properties as
@dynamicand implement these two methods to handle the forwarding –methodSignatureForSelector:andforwardInvocation:. Implementation will be something has described below –