为什么我用下面的代码就画不出直线呢,屏幕一片空白
- (void)viewDidLoad
{
[super viewDidLoad];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextMoveToPoint(context, 20, 20);
CGContextAddLineToPoint(context, 100,100);
CGContextStrokePath(context);
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
继承UIView,重写方法