OBJ-C: Call an instance of core-plot graph from separate view controller
- by Kevin
I'm using a view controller i.e. ViewController:UIViewController and have another class GraphViewController:UIViewController .
How do I call an instance of GraphViewController and place it into my ViewController? I am currently trying to call the plot within my ViewController directly, but I want to make the graph modular so I don't have to copy code if I use the same graph again.
ViewController has methods
-(void) refreshGraph;
//Inhereted Methods
-(NSUInteger)numberOfRecordsForPlot:(CPPlot *)plot;
-(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index;
How do I move these methods to a separate class and then call it to get the same plot in my ViewController?
I am sure there must be a thread on this somewhere but I can't seem to find it.