UIBezierPath *myPath = [[UIBezierPath bezierPath];
[myPath moveToPoint: firstPoint];
[myPath addLineToPoint: secondPoint];
myPath.lineWidth = 10;
[[UIColor yellowColor]setStroke];
[myPath stroke];
當我運行此代碼時,它自然會繪製一段(從1點到另一個)。我試圖找到一種方法來繪製一縷曙光。我的意思是通過「secondPoint直到屏幕年底從「羅克韋爾FirstPoint」畫畫。我不介意,如果射線點那張永遠(我猜)。使用UIBezierPath(IOS)繪製具有2個CGPoint的光線
這會是什麼樣子。
謝謝。
(如果你需要它,屏幕大小736x414像素)