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像素)