Question

I want to draw graph (ECG Type) for heart rate monitors application in iPhone. I dont want to use core plot, but like to develop with quartz. I am receiving heart beat values from bluetooth device, now i want to create the graph based upon the values received from BLE?

Thanks

Était-ce utile?

La solution

A first simple approach would be to use UIBezierPath to draw a line in drawRect: of your view. You would have to convert the values you receive into the coordinate system of your view and then create an instance of UIBezierPath where you add all relevant point with addLineToPoint:. In the end you call [bezierPath stroke] to actually draw the line. You could create a Datasource-Protocol for your ViewController and a reload method on your view which triggers the views to redraw whenever new data is received.

Autres conseils

Downlaod the sample code from bellow url :)

Sample code here

Don't forget +1

Thanks,

:)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top