ios - Xcode7 Core Plot Errors: CPTPlot, NSString -
i'm new both xcode7 , core plot, , i'm trying follow beginner tutorial here: http://www.raywenderlich.com/13269/how-to-draw-graphs-with-core-plot-part-1
everything seems fine until have add code cpdpiechartviewcontroller.m
#pragma mark - cptplotdatasource methods -(nsuinteger)numberofrecordsforplot:(cptplot *)plot { return 0; } -(nsnumber *)numberforplot:(cptplot *)plot field:(nsuinteger)fieldenum recordindex:(nsuinteger)index { return 0; } -(cptlayer *)datalabelforplot:(cptplot *)plot recordindex:(nsuinteger)index { return nil; } -(nsstring *)legendtitleforpiechart:(cptpiechart *)piechart recordindex:(nsuinteger)index { return @""; } #pragma mark - uiactionsheetdelegate methods -(void)actionsheet:(uiactionsheet *)actionsheet clickedbuttonatindex:(nsinteger)buttonindex { } i number of errors after this: in cpdpiechartviewcontroller.m: (cptplot *) expected type, in cpdconstants.h: unknown type name nsstring (i have ensured there no .c files in xcode project. there other reasons appear?)
i have made screen shot of errors on each file
has dealt before. appreciated!
you're missing import statements in header files. since cpdconstants.h references nsstring, needs foundation @ minimum (#import <foundation/foundation.h>).
cpdpiechartviewcontroller.h , other file references core plot types needs import core plot header. use #import <coreplot/coreplot.h> if included core plot framework or #import "coreplot-cocoatouch.h" if you're using static library.

Comments
Post a Comment