OBJ-C: Call an instance of core-plot graph from separate view controller
        Posted  
        
            by Kevin
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Kevin
        
        
        
        Published on 2010-03-08T14:19:27Z
        Indexed on 
            2010/03/08
            14:21 UTC
        
        
        Read the original article
        Hit count: 551
        
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.
© Stack Overflow or respective owner