How can I make a core-plot graph on the phone that doesn't auto-expand to fill the whole superview
Posted
by Robb
on Stack Overflow
See other posts from Stack Overflow
or by Robb
Published on 2010-02-27T01:00:42Z
Indexed on
2010/05/06
14:38 UTC
Read the original article
Hit count: 245
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?
© Stack Overflow or respective owner