How can I make a core-plot graph on the phone that doesn't auto-expand to fill the whole superview
- by Robb
I'm pretty sure I saw an example where the graph wasn't filling the whole iPhone screen, but I can't get that to happen in my app, nor in the Core-Plot Test app from Switch On The Code.
I've added a subview to the original CPLayerHostingView in the sample, then changed the classes – original back to UIView, new subview to CPLayerHostingView, and I've reconnected the File's owner's view outlet to the new subview.
When I create a graph with:
graph = [[CPXYGraph alloc] initWithFrame: theSubviewOutlet.bounds];
… and step through the first stages of building up the layers the bounds are accurate (i.e. the same as in the .xib)
however, when all the initialization is done, and the graph shows up, it fills the whole superview.
Am I missing something obvious?