How to draw a pie chart using iPhone sdk?
Here’s one way to draw a PIE chart using the latest iPhone SDK. There are a ton of tutorials out there that let you get started with the iPhone app development itself and I am by no means any authoritative source on learning how to develop one. Having said that, here’s a class file that will help you use the UIKit and Quartz to draw vector graphics. GraphView.h 1 2 3 4 5 6 7 8 9 10 11 12 # #(nothing to see here) # #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> @interface GraphView : UIView { } @end GraphView.m 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 #import "GraphView.h" #define PI 3.14159265358979323846 static inline float radians ( double degrees ) { return degrees * PI / 180 ; } @implementation GraphView - ( void ) drawRect : ( CGRect ) rect { ...