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.
精彩评论