开发者

Ellipse through TouchMoved?

开发者 https://www.devze.com 2023-02-16 06:56 出处:网络
is it possible to draw Ellipse through UITouchMoved in iph开发者_运维百科one sdk as we do in MSPaint?Any

is it possible to draw Ellipse through UITouchMoved in iph开发者_运维百科one sdk as we do in MSPaint?Any example please?


Just save the rect in the touch moved delegate, and draw an ellipse in the rect (maybe using CGContextStrokeEllipseInRect) whenever the view's drawRect gets called. Call setNeedsDisplay to say that the drawRect needs to be called sometime before returning to the run loop.


Guessing that you mean ellipse rather than eclipse? If so, use +[UIBezierPath bezierPathWithOvalInRect:].

0

精彩评论

暂无评论...
验证码 换一张
取 消