看CA教程,执行完drawLayer后闪退,demo如下
-(void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx{
//线宽
CGContextSetLineWidth(ctx, 10.0f);
//线颜色
CGContextSetStrokeColorWithColor(ctx, [UIColor greenColor].CGColor);
//画椭圆
CGContextStrokeEllipseInRect(ctx, layer.bounds);
}
是需要释放指针咩?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
闭关修行中......