Core Plot IPad性能问题 [英] Core Plot IPad performance issue

查看:79
本文介绍了Core Plot IPad性能问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我在带有分页的滚动视图上获得了核心情节条形图,在iPhone上所有工作正常,您在不同页面之间进行分页,其中一个是具有自己的触摸手势和属性的情节。
当我在IPad上运行相同的代码时问题开始了。情节变得缓慢且滞后,所有触摸手势都需要花费大量时间来响应并且整个滚动条分页变得沉重和缓慢。
图表本身包含100点左右(不是那么大)。
我在某处看到,IPhone和IPad之间的绘图空间的变化使得性能发生了这些变化,因为IPad渲染了4倍的图形。以前有人有这个问题吗?我有什么办法可以在IPad上提高性能而不受限制或丢失预制棒数据吗?

In my app, i got core plot bar chart on a scroll view with paging, on IPhone all work fine , you page between different pages, one of them is the plot with its own touch gestures and properties. Problem starts when i run the same code on IPad. plot becomes slow and laggy, all touch gestures takes a lot of time to response and the whole scroller paging becomes heavy and slow. the chart itself contains 100 points or so (not so big). I've read somewhere that the change of plot space between IPhone and IPad makes these changes in performance because the IPad renders 4 times the graphics. Did anybody had this problem before? Is there something i can do to make performance better on IPad without limit or lose preform data?

推荐答案

不知道你的具体细节应用程序,以下是一些一般性能提示:

Without knowing the specifics of your app, here are some general performance hints:


  1. 设置不需要的所有线型和填充 nil 而非透明色。

尽可能使用纯色填充而不是渐变或图像。

Use solid color fills rather than gradients or images where possible.

尽可能减少轴标签,刻度线和网格线的数量。也许完全消除次要刻度线和网格线(将相应的线型设置为 nil )。

Reduce the number of axis labels, tick marks, and grid lines if possible. Perhaps eliminate minor tick marks and grid lines completely (set the corresponding line styles to nil).

当大部分绘图数据发生变化时,只调用 -reloadData 。尽可能使用insert和delete方法。请参阅 Plot Gallery 示例应用程序中的实时图。

Only call -reloadData when a significant portion of the plot data changes. Use the insert and delete methods when possible. See the "Real Time Plot" in the Plot Gallery example app.

这篇关于Core Plot IPad性能问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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