开发者

Continously Updating UIViews in Objective C

I am very new to Iphone programming with Objective-C but I have picked up pretty fast in the last 1 month.

I have an application that reads data from a .csv which I then use to plot a continous graph on the Iphone. The problem is that there are close to 84,000 data points ( a major requirement) and the current design I used with Quartz 2D has helped to make the required plots but it takes close to 3mins for the UIView to show the infinitely long plot I desire.

The solution I am looking for is this

I intend to use a function in normal C language to sequential access the file 开发者_StackOverflow中文版within a thread and pass it to the drawing function which will then update the screen as the data arrives so that the user has a feel of how the data is been plotted continously. The problem I have however is that the CGRECT drawing function and the setNEEDSDisplay would just take all the points at once and display on the UIView,

How do I update only specific point on the UIView as the data arrives without clearing the whole View


You'll want to use setNeedsDisplayInRect as described here:

Drawing incrementally in a UIView (iPhone)


Have you looked at using Core Plot?

http://code.google.com/p/core-plot/

It's a little hard to figure out, google for example uses. But it may be able to handle what you need through selective plotting of large data sets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜