I have a view that will draw a chart … there are going to be more than one chart type … How do I wrap them in a factory class? So I have a MyChart class (UIView subclass)… and if the user can do something like :
MyChart *chart = [[Mychart alloc] initWithFrame:frame andType:1];
and chart will actually become a MyLineChart object … or some other object that myChart can create?
Do I just create thouse views in the init of the myChart class .. and return them in stead of returning self?
Pseudo code like this
in MyChart.m add a class method: