我正在尝试从图像视图的起始点到其目标点画一条线。我的问题是(我猜)如何将超级视图设置为当前绘图上下文(来自图像视图)。有人可以帮忙吗?这是我在图像视图中使用的代码..
//UIGraphicsPopContext();
CGContextRef context = UIGraphicsGetCurrentContext(); //(problem here????????)
CGContextSetLineWidth(context, 5.0);
CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
CGContextMoveToPoint(context, startLocationInView.x, startLocationInView.y);
CGContextAddLineToPoint(context, destinationPositionInView.x, destinationPositionInView.y);
CGContextStrokePath(context);