tags:

views:

13

answers:

1

This is my first app on the ipad and the first time using core plot. I would be grateful for any help.

I have two separate hosted views (1 for a scatter plot and 1 for a bar chart) that are loaded in viewDidLoad:

My problem is that I would like the existing bar chart to curl up to reveal another bar chart plot (in the same hosted layer) in response to a user event such as swiping a finger on the bar chart.

I would think that CATransition could be used for this, but so far have not seen any example to do that. My view didLoad calls up a method constructBarChart: that sets up the initial bar chart.

@interface testCorePlotWindowViewController : UIViewController {

IBOutlet CPXYGraph *graph, *barChart;

IBOutlet CPLayerHostingView *scatterPlotView, *barChartView; ... UIButton *goButton, *resetButton; ...

}

  • (void)constructBarChart { // Create barChart from theme barChart = [[CPXYGraph alloc] initWithFrame:CGRectZero];

    barChartView.hostedLayer = barChart; ... CPBarPlot *barPlot = [CPBarPlot tubularBarPlotWithColor:[CPColor yellowColor] horizontalBars:NO]; barPlot.baseValue = CPDecimalFromString(@"0"); barPlot.dataSource = self; barPlot.barOffset = -0.25f; barPlot.identifier = @"Bar Plot 1"; [barChart addPlot:barPlot toPlotSpace:plotSpace]; }

Any ideas?

A: 

Found how to do this. This was very helpful http://stackoverflow.com/questions/1666965/pageturn-animation-in-iphone

iPadnewbie