摘要:
// .获取上下文,之前的上下文都是在view的drawRect方法中获取(跟View相关联的上下文layer上下文) // 目前我们需要绘制图片到新的图片上,因此需要用到位图上下文 // 怎么获取位图上下文,注意位图上下文的获取方式跟layer上下文不一样。位图上下文需要我们手动创建。 // 开启 阅读全文
摘要:
#pragma mark - 绘图的几种方式 #pragma mark - 绘图第三种方式 1.#pragma mark - 最原始的绘图方式 - (void)drawLine { // 1.获取图形上下文 // 目前我们所用的上下文都是以UIGraphics // CGContextRef Ref 阅读全文
摘要:
// 获取屏幕的宽度 #define screenW [UIScreen mainScreen].bounds.size.width #import "ViewController.h" @interface ViewController () @end @implementation ViewCo 阅读全文