开发者

get pdf data automatically after drawing (core Plot)

开发者 https://www.devze.com 2023-04-06 11:49 出处:网络
I have a process that collected data. at specific intervals I need to create graphs and send them to a different process as pdf data.

I have a process that collected data. at specific intervals I need to create graphs and send them to a different process as pdf data. I gather the data, create the points and I call [graph reloadData]. The problem 开发者_如何学Gois: when will the drawing be finished so I can collect the data using: NSData * pdfData = [graph dataForPDFRepresentationOfLayer];? I can call it with a delay after the reload data but it is a bit fishy. Is there a notification/function to override to know when the drawing is complete?

Thanks


No need for a delay. -dataForPDFRepresentationOfLayer will make sure the data is up-to-date and render the graph into an offscreen drawing context.

0

精彩评论

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

关注公众号