Application get stuck when drawing nearly 40 Scatter Plots using Core Plot in IPad

与世无争的帅哥 提交于 2019-12-23 03:57:07

问题


I am developing an iPad app , it has the option to show Scatter Plots user able to plot the points.I have used core plot library.i have to show 40 Scatter plots in a view controller. my application becomes not responding and get quits when i load 25 graphs.

  1. Is there any limitation (No.of Scatter plot counts) in Core plot for a View Controller to show?

  2. What is the optimal way to load Scatter Plots using Core Plot?


回答1:


There's no hard limit on the number of graphs, but you will eventually run out of memory and/or other GPU resources. The maximum number you can show in a particular app will depend on the physical size and complexity of the graphs as well as the hardware it's running on.

If all 40 plots need to be visible at the same time, try setting collapsesLayers to YES on the hosting view so each graph only uses one Core Animation layer. Another technique that you can use if you don't need the graphs to be interactive is to render each graph into an image using the -imageOfLayer method and display those on screen. You can release the graph after rendering.



来源:https://stackoverflow.com/questions/10279736/application-get-stuck-when-drawing-nearly-40-scatter-plots-using-core-plot-in-ip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!