Case:
Created an view based application in the Xcode and created a new View called chartView:UIView and mapped the controller using the IB .
I wanted to draw a simple arc on my ChartView . So inside my drawRect method I put the code for the arc.
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 1.0);
CGContextSetLineWidth(context, 2.0);
int x = 150;
int y= 100;
int r= 80;
CGContextSetRGBFillColor(context, 0, 1, 0, 1);
CGContextMoveToPoint(context, x, y);
CGContextAddArc(context,x , y, r, 0.0*M_PI/180.0, 90.0*M_PI/180.0, 0);
CGContextClosePath(context);
CGContextFillPath(context);
I see an empty screen when I start my application.
Can someone tell me if I am missing any step. Thanks For the help.
Created an view based application in the Xcode and created a new View called chartView:UIView and mapped the controller using the IB .
I wanted to draw a simple arc on my ChartView . So inside my drawRect method I put the code for the arc.
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 1.0);
CGContextSetLineWidth(context, 2.0);
int x = 150;
int y= 100;
int r= 80;
CGContextSetRGBFillColor(context, 0, 1, 0, 1);
CGContextMoveToPoint(context, x, y);
CGContextAddArc(context,x , y, r, 0.0*M_PI/180.0, 90.0*M_PI/180.0, 0);
CGContextClosePath(context);
CGContextFillPath(context);
I see an empty screen when I start my application.
Can someone tell me if I am missing any step. Thanks For the help.