美文网首页
关于CGContextRef无效的问题

关于CGContextRef无效的问题

作者: 我是卖报滴小行家 | 来源:发表于2016-11-07 15:26 被阅读207次
  • 在实现CGContextRef制图的过程用,因为直接调用“[self drawRect:self.bounds]”出现啦如下错误:
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextBeginPath: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextSetLineWidth: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextSetLineCap: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextSetLineJoin: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextSetRGBStrokeColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Nov  7 15:22:09 7777 PasswordDemo[15969] <Error>: CGContextMoveToPoint: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

🐷解决办法:
其实在实现的制图过程中,我们不需要直接调用“[self drawRect:self.bounds]”,只要调用“[self setNeedsDisplay]”即可。

相关文章

  • 关于CGContextRef无效的问题

    在实现CGContextRef制图的过程用,因为直接调用“[self drawRect:self.bounds]”...

  • iOS中关于截图的注意点(renderInContext &am

    截图 关于截图有两个方法: - (void)renderInContext:(CGContextRef)ctx: ...

  • 关于CGContextRef和CGMutablePathRef

    来自网络摘抄 --------- 1.1背景知识 Graphics Context是图形上下文,可以将其理解为一...

  • CGContextRef

    /* CoreGraphics - CGContext.h */ /** Graphics state funct...

  • CGContextRef

    CGContextRef An opaque type that represents a Quartz 2D d...

  • CGContextRef

    以前很不喜欢写技术文章,现在越来越喜欢写了,还是古语说得好,好记性不如烂笔头,当自己总是掉入同一个坑之后,发现记笔...

  • CGContextRef

    自定义显示画框的view 画直线 写文字 画弧线 画圆 有填充颜色的圆 画矩形 画扇形,其实就是画圆,设置一下角度。

  • CGContextRef

    什么是 CGConTextRef CGConTextRef相当于一个画布,我们可以在上面画各种各样的图形,而这个画...

  • CGContextRef

    画纸 设置 画字 画线 画圆 画图

  • iOS绘画篇:Quartz2D

    关键步骤: 获取CGContextRef 调用CGContextRef的方法进行绘图 自定义UIView时获取 C...

网友评论

      本文标题:关于CGContextRef无效的问题

      本文链接:https://www.haomeiwen.com/subject/dpsouttx.html