Closed GoogleCodeExporter closed 9 years ago
Did you set the autoresizingMask on the CPTGraphHostingView? You can do it in
code or in Interface Builder (IB). In the version of IB built into Xcode 4, the
Mode property under "View" should be "Scale to Fill".
Original comment by eskr...@mac.com
on 9 Aug 2011 at 1:25
I can't have rotation with the work around provided. Could you please provide
some more details ?
Original comment by putty...@gmail.com
on 27 Sep 2011 at 8:22
CPTGraphHostingView is a subclass of UIView. You can adjust its size and
position like any other UIView. It will resize the hosted graph to fill its
bounds.
Original comment by eskr...@mac.com
on 28 Sep 2011 at 12:06
The Mode property under "View" has been set to "Scale to Fill"
Original comment by catje...@googlemail.com
on 30 Sep 2011 at 1:11
I have checked out with newest core plot version and the problem remains.
To simplify things I have attached a sample Xcode project, which demonstrates
the point.
Compile and run that program in iPhone simulator and note that graph is not
rescaled if rotated left or right from the default vertical orientation.
Now in Plot2ViewController.m find overwritten setBounds method of
CPTGraphHostingViewPatched and comment in the two lines (if (!..)
hostedGraph.frame = self.bounds;
Rerun and observe that scaling is now correct (this is workaround 1)
For workaround 2 : put back the comments around (if (!..) hostedGraph.frame =
self.bounds).
Find the line #if 0 in same file and change to #if 1.
Finally edit the Plot2ViewController.xib and change the class for "Graph
Hosting View" from "CPTGraphHostingViewPatched" to a simple UIView.
Rerun and observe that scaling after rotation is still correct (this is
workaround 2)
Original comment by catje...@googlemail.com
on 30 Sep 2011 at 1:56
Attachments:
This issue was closed by revision b60f5e9793fd.
Original comment by eskr...@mac.com
on 1 Oct 2011 at 8:36
Original issue reported on code.google.com by
catje...@googlemail.com
on 8 Aug 2011 at 10:50