欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

绘制图形

程序员文章站 2022-05-25 21:17:10
...
  • 绘制椭圆
@interface SunView : UIView

@end

@implementation SunView

- (void)drawRect:(CGRect)rect {
  [super drawRect:rect];
  UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:self.bounds];
  [[UIColor redColor] setFill];
  [path fill];
}

@end