UIViewで(画像をリンクするなど)画像ビューの間に線を引きたい。利用した
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
CGContextSetLineWidth(context, 2.0);
CGContextMoveToPoint(context, 0,0); //start at this point
CGContextAddLineToPoint(context, 20, 20); //draw to this point
CGContextStrokePath(context);
しかし、ここでは、私のコンテキストは null です。フレームワークをインポートする必要があるか、ヘッダーをインポートする必要があるかどうかはわかりません。提案やサンプルをいただければ幸いです。
前もって感謝します。