Frage

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

War es hilfreich?

Lösung

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.

Andere Tipps

Downlaod the sample code from bellow url :)

Sample code here

Don't forget +1

Thanks,

:)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top