绘制图形

  • 绘制椭圆
@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

你可能感兴趣的:(绘制图形)