I am trying to draw an arc. But nothing is drawn?
- (void)viewDidLoad {
[super viewDidLoad];
CGRect rect = CGRectMake(0,0,340,480);
UIView *ui = [[UIView alloc] initWithFrame:rect];
[self.view addSubview:ui];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextAddArc(context, 50, 50, 20, 0, 30, 0);
}
You have to stroke or fill the arc before its visible. You’ve got a path on screen but you have to stroke or fill it before draws visibly. Use these to do that..