如何旋转条形图,例如示例“ CPTTestApp-iPhone”提供在核心情节? [英] How to rotate bar chart like the example "CPTTestApp-iPhone" provided in core plot?

查看:81
本文介绍了如何旋转条形图,例如示例“ CPTTestApp-iPhone”提供在核心情节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使我的条形图具有与核心图中提供的示例相同的旋转行为。我正在使用xcode4并在一段时间内没有运气,因此无法正常工作。如果我在示例中复制代码,效果很好,如何为自己的项目完成代码?参见下面的图像

I am trying to have my bar chart have the same rotate behaviour as in the example provided in core plot. I am using xcode4 and been googling with no luck for a while to get this working . If i copy my code in the example it does work fine, how can I do it for my own project? See images below

推荐答案

添加:

$self.hostingView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);$

信用不是我的,答案也出在其他地方的Stack Overflow上……找不到它。

Credit isn't mine, the answer was also on Stack Overflow somewhere else...can't find it.

PS:显然用任何 CPTGraphHostingView 替换< self.hostingView> 您已分配来托管图形和绘图。

PS: Obviously replace <self.hostingView> with whatever CPTGraphHostingView you allocated to host your graph and plots in.

这篇关于如何旋转条形图,例如示例“ CPTTestApp-iPhone”提供在核心情节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆