获得context
UIView的drawRect方法中:
UIGraphicsGetCurrentContext();
创建画布,获得context。最常用的imageContext:
UIGraphicsBeginImageContextWithOptions(annoImage.size, NO, 0.0); CGContextRef context = UIGraphicsGetCurrentContext();
时间: 2024-09-30 04:10:45
UIView的drawRect方法中:
UIGraphicsGetCurrentContext();
创建画布,获得context。最常用的imageContext:
UIGraphicsBeginImageContextWithOptions(annoImage.size, NO, 0.0); CGContextRef context = UIGraphicsGetCurrentContext();