首页 > 代码库 > Graphics总结

Graphics总结

获得context

UIView的drawRect方法中:

UIGraphicsGetCurrentContext();

创建画布,获得context。最常用的imageContext:

UIGraphicsBeginImageContextWithOptions(annoImage.size, NO, 0.0);CGContextRef context = UIGraphicsGetCurrentContext();

 

Graphics总结