0
我想在CPXYPlotSpace上的x軸上顯示數據。我已經看到使用類似的東西在mac上這樣做,但它不適用於iphone,所以任何建議或我必須手動執行。使用核心圖的x軸iphone上的日期
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
dateFormatter.dateStyle = kCFDateFormatterShortStyle;
CPTimeFormatter *timeFormatter = [[[CPTimeFormatter alloc] initWithDateFormatter:dateFormatter] autorelease];
timeFormatter.referenceDate = refDate;
x.labelFormatter = timeFormatter;
我使用'NSTimeInterval。一天= 24 * 60 * 60; (0「20/6/2011」)長度:CPDecimalFromFloat(oneDay * 5.0f)];' – time