上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页

2017年3月22日

IOS 绘制条纹背景

摘要: @interface NJViewController () @property (weak, nonatomic) IBOutlet UITextView *contentView; - (IBAction)preBtnClick:(id)sender; - (IBAction)nextBtnClick:(id)sender; @property (nonatomic, assign) ... 阅读全文

posted @ 2017-03-22 09:39 守望星空 阅读(299) 评论(0) 推荐(0) 编辑

2017年3月21日

IOS 图片剪切(封装数据)

摘要: 封装 :生成头像(UIImage (NJ).h / .m @interface UIImage (NJ) /** * 生成头像 * * @param icon 头像图片名称 * @param border 头像边框大小 * @param color 头像边框的颜色 * * @return 生成好的头 阅读全文

posted @ 2017-03-21 23:03 守望星空 阅读(122) 评论(0) 推荐(0) 编辑

IOS 绘制图片水印(封装)

摘要: 封装:绘制图片水印 UIImage (NJ).h /.m @interface UIImage (NJ) /** * 生成水印 * * @param bgName 背景图片 * @param logNmae 水印图片 * * @return 生成好的图片(带水印的图片) */ + (instance 阅读全文

posted @ 2017-03-21 22:24 守望星空 阅读(299) 评论(0) 推荐(0) 编辑

IOS Quartz2D自定义view

摘要: @property (nonatomic, weak) UIImageView *imageView; @property (nonatomic, weak) NJImageView *njIv; @end @implementation NJViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any... 阅读全文

posted @ 2017-03-21 22:22 守望星空 阅读(109) 评论(0) 推荐(0) 编辑

IOS Quarzt2D 手动的释放

摘要: - (void)drawRect:(CGRect)rect { // 1.获取上下文 CGContextRef ctx = UIGraphicsGetCurrentContext(); // 2.绘制图形 /* // 设置起点 CGContextMoveToPoint(ctx, 10, 10); // 设置终点 CGC... 阅读全文

posted @ 2017-03-21 22:17 守望星空 阅读(103) 评论(0) 推荐(0) 编辑

IOS -刷帧动画(CADisplayLink)

摘要: @property (nonatomic, assign) int imageY; @end @implementation NJView -(void)awakeFromNib { NSLog(@"awakeFromNib"); // 创建CADisplayLink, 默认每秒60次 CADisplayLink *display = [CADisplayLink... 阅读全文

posted @ 2017-03-21 22:12 守望星空 阅读(141) 评论(0) 推荐(0) 编辑

IOS 监听slider滑动

摘要: // 监听slider滑动 - (IBAction)valueChnage:(UISlider *)sender; @property (weak, nonatomic) IBOutlet NJView *circleView; @end @implementation NJViewController - (IBAction)valueChnage:(UISlider *)sende... 阅读全文

posted @ 2017-03-21 22:02 守望星空 阅读(485) 评论(0) 推荐(0) 编辑

IOS 图形上下文栈

摘要: - (void)drawRect:(CGRect)rect { // 获取上下文 CGContextRef ctx = UIGraphicsGetCurrentContext(); // 保存一份最纯洁的图形上下文 // 调用一次该方法就会拷贝一个上下文到栈中 CGContextSaveGState(ctx); //CGConte... 阅读全文

posted @ 2017-03-21 21:53 守望星空 阅读(145) 评论(0) 推荐(0) 编辑

IOS 绘制基本图形(画文字、图片水印)

摘要: - (void)drawRect:(CGRect)rect { // Drawing code // [self test]; // 1.加载图片到内存中 UIImage *image = [UIImage imageNamed:@"bg"]; // 利用OC方法将图片绘制到layer上 // 将图片绘制到指... 阅读全文

posted @ 2017-03-21 21:49 守望星空 阅读(717) 评论(0) 推荐(0) 编辑

IOS 绘制基本图形( 画圆、画线、画圆弧、绘制三角形、绘制四边形)

摘要: // 当自定义view第一次显示出来的时候就会调用drawRect方法- (void)drawRect:(CGRect)rect { // 1.获取上下文 CGContextRef ctx = UIGraphicsGetCurrentContext(); // 画圆 CGContextAddArc(ctx, 100, 100, 50, 0, 2 * M_PI, ... 阅读全文

posted @ 2017-03-21 21:45 守望星空 阅读(1722) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页

导航