摘要:
#import "LockView.h" @interface LockView () @property (nonatomic, strong) NSMutableArray *selectedsBtn; @property (nonatomic, assign) CGPoint curP; @e 阅读全文
摘要:
欢迎关注简书iOS藏经阁 阅读全文
摘要:
#import "ViewController.h" @interface ViewController () @property (nonatomic, assign) CGPoint startP; @property (weak, nonatomic) IBOutlet UIImageView 阅读全文
摘要:
+ (UIImage *)imageWithCaputureView:(UIView *)view { // 开启位图上下文 UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0); // 获取上下文 CGContextRef 阅读全文
摘要:
- (void)clipImage { // 0.加载图片 UIImage *image = [UIImage imageNamed:@"阿狸头像"]; // 1.开启位图上下文,跟图片尺寸一样大 UIGraphicsBeginImageContextWithOptions(image.size, 阅读全文
摘要:
// .获取上下文,之前的上下文都是在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 阅读全文