What I want to achieve is to have a "transparent" unifying class that can contain one item of a number of classes that fulfil a number of criteria (one of them is inheritance from UIView). What i mean by transparent is that if i ask this generic class for a property that it does not contain (directly) it checks if the item inside it contains that property automatically. I'm not sure how to describe this any better without an example, so here's what I'm looking to achieve.
Instead of this:
objectOfGenericClass.itemInside.center
I want this:
objectOfGenericClass.center
without absurd amounts of repeating code in the generic class that looks like this:
public var center:CGPoint{
return itemInside.center
}
If I need to be more specific please ask questions, but I might be unavailable for a couple of hours in a meeting (will remove this bit when I'm back)