I want to create a simple "control" that will have 4 UILabels defined in it. On one hand I'd like to use Interface Builder to layout my design but on the other hand i'd like to expose some properties that will define contents of each label - is it possible?
@interface CompositeView : UIView{
int numberOne;
int numberTwo;
}
@property(nonatomic,assign) int numberOne; //set from view controller and reflected by first UILabel text
@property(nonatomic,assign) int numberTwo; //set from view controller and reflected by second UILabel text
Now ideally I want to do things like:
compositeView.numberTwo=9232;
in my view controller. The problem is .. how do I design view's appearance in IB but expose/implement some of the neccessary logic in code? One idea is to load a NIB file in CompositeView with a view defined and add such view as a subview.. but it feels like fighting with the framework.