I am using the Coreplot API to create a bar graph. When I try to run this same code as an individual project it's working fine but when I integrate it to my project inside UINavigationController
it is giving me an error.
GraphView.h
@interface GraphView : CPTGraphHostingView <CPTPlotDataSource, CPTPlotSpaceDelegate>
{
CPTXYGraph *graph;
NSArray *dates;
}
@property(nonatomic, retain) NSArray *dates;
GraphView.m
dates = [NSArray arrayWithObjects:@"2012-05-01", @"2012-05-02", @"2012-05-03",
@"2012-05-04", @"2012-05-05", @"2012-05-06", @"2012-05-07", @"2012-05-08", @"2012-05-09",@"2012-05-10",@"2012-05-11",@"2012-05-12",@"2012-05-13",@"2012-05-14",@"2012-05-15",@"2012-05-16",@"2012-05-17",@"2012-05-18",@"2012-05-19",@"2012-05-20",nil];
- (NSUInteger)numberOfRecordsForPlot:(CPTPlot *)plot
{
return dates.count;
}
On return dates.count it is giving me the error.
[__NSArrayI count]: message sent to deallocated instance 0x6dbfd10