• <i id='eXd4Q'><tr id='eXd4Q'><dt id='eXd4Q'><q id='eXd4Q'><span id='eXd4Q'><b id='eXd4Q'><form id='eXd4Q'><ins id='eXd4Q'></ins><ul id='eXd4Q'></ul><sub id='eXd4Q'></sub></form><legend id='eXd4Q'></legend><bdo id='eXd4Q'><pre id='eXd4Q'><center id='eXd4Q'></center></pre></bdo></b><th id='eXd4Q'></th></span></q></dt></tr></i><div id='eXd4Q'><tfoot id='eXd4Q'></tfoot><dl id='eXd4Q'><fieldset id='eXd4Q'></fieldset></dl></div>
  • <tfoot id='eXd4Q'></tfoot>

  • <legend id='eXd4Q'><style id='eXd4Q'><dir id='eXd4Q'><q id='eXd4Q'></q></dir></style></legend>

      • <bdo id='eXd4Q'></bdo><ul id='eXd4Q'></ul>

      <small id='eXd4Q'></small><noframes id='eXd4Q'>

      1. 创建 UIImageView 时上下文无效

        Invalid context when creating UIImageView(创建 UIImageView 时上下文无效)

      2. <i id='aecOx'><tr id='aecOx'><dt id='aecOx'><q id='aecOx'><span id='aecOx'><b id='aecOx'><form id='aecOx'><ins id='aecOx'></ins><ul id='aecOx'></ul><sub id='aecOx'></sub></form><legend id='aecOx'></legend><bdo id='aecOx'><pre id='aecOx'><center id='aecOx'></center></pre></bdo></b><th id='aecOx'></th></span></q></dt></tr></i><div id='aecOx'><tfoot id='aecOx'></tfoot><dl id='aecOx'><fieldset id='aecOx'></fieldset></dl></div>
      3. <legend id='aecOx'><style id='aecOx'><dir id='aecOx'><q id='aecOx'></q></dir></style></legend>

          <tbody id='aecOx'></tbody>
          <bdo id='aecOx'></bdo><ul id='aecOx'></ul>

              <small id='aecOx'></small><noframes id='aecOx'>

              1. <tfoot id='aecOx'></tfoot>
                  本文介绍了创建 UIImageView 时上下文无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在尝试创建 UIImageView 时出错.看这段代码:

                  I have an error when I tried to create a UIImageView. Look at this code :

                  UIImage* backgroundPanel = [[UIImage imageNamed:@"loginPanelBackground.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(90, 0, 149, 416)];
                  
                  self.connexionBackgroundImgView = [[UIImageView alloc] initWithImage:backgroundPanel];
                  self.connexionBackgroundImgView.frame = CGRectMake(0, 0, 416, 390); // THIS LINE PROVOC THE INVALID CONTEXT
                  [self.connexionView insertSubview:self.connexionBackgroundImgView aboveSubview:self.connexionToCreationCompteView];
                  

                  它在日志中抛出这个错误:

                  It throws this error in the log :

                  <Error>: CGContextSaveGState: invalid context 0x0
                  <Error>: CGContextSetBlendMode: invalid context 0x0
                  <Error>: CGContextSetAlpha: invalid context 0x0
                  <Error>: CGContextTranslateCTM: invalid context 0x0
                  <Error>: CGContextScaleCTM: invalid context 0x0
                  <Error>: CGContextGetCTM: invalid context 0x0
                  <Error>: CGContextSaveGState: invalid context 0x0
                  <Error>: CGContextClipToRect: invalid context 0x0
                  <Error>: CGContextDrawTiledImage: invalid context 0x0
                  <Error>: CGContextRestoreGState: invalid context 0x0
                  <Error>: CGContextGetCTM: invalid context 0x0
                  <Error>: CGContextSaveGState: invalid context 0x0
                  <Error>: CGContextClipToRect: invalid context 0x0
                  <Error>: CGContextDrawTiledImage: invalid context 0x0
                  <Error>: CGContextRestoreGState: invalid context 0x0
                  <Error>: CGContextGetCTM: invalid context 0x0
                  <Error>: CGContextSaveGState: invalid context 0x0
                  <Error>: CGContextClipToRect: invalid context 0x0
                  <Error>: CGContextDrawTiledImage: invalid context 0x0
                  <Error>: CGContextRestoreGState: invalid context 0x0
                  <Error>: CGContextRestoreGState: invalid context 0x0
                  

                  我只在 iPad 上遇到过这个错误,在模拟器上没有,我不明白..:/

                  I had this error only on the iPad, not with the Simulator, I don't understand.. :/

                  推荐答案

                  在此处查看答案:如何捕获 UITableView/UIScrollView 的完整内容的 UIImage 并使其在 ios 设备上工作

                  感谢 eliajf !

                  Thanks eliajf !

                  这篇关于创建 UIImageView 时上下文无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  what#39;s property copy means in Cocoa#39;s Framework?(like UITabBar#39;s items property)(Cocoa 框架中的属性副本是什么意思?(如 UITabBar 的 items 属性))
                  Can`t copy file from bundle to documents directory in iOS(无法将文件从捆绑包复制到 iOS 中的文档目录)
                  Automatically copy property values from one object to another of a different type but the same protocol (Objective-C)(自动将属性值从一个对象复制到另一个类型不同但协议相同的对象 (Objective-C))
                  Copy text to clipboard with iOS(使用 iOS 将文本复制到剪贴板)
                  How to copy text to clipboard/pasteboard with Swift(如何使用 Swift 将文本复制到剪贴板/粘贴板)
                  How to show the progress of copying a large file in iOS?(如何在iOS中显示复制大文件的进度?)
                    <tbody id='b1eMI'></tbody>

                • <legend id='b1eMI'><style id='b1eMI'><dir id='b1eMI'><q id='b1eMI'></q></dir></style></legend>
                  • <small id='b1eMI'></small><noframes id='b1eMI'>

                      <i id='b1eMI'><tr id='b1eMI'><dt id='b1eMI'><q id='b1eMI'><span id='b1eMI'><b id='b1eMI'><form id='b1eMI'><ins id='b1eMI'></ins><ul id='b1eMI'></ul><sub id='b1eMI'></sub></form><legend id='b1eMI'></legend><bdo id='b1eMI'><pre id='b1eMI'><center id='b1eMI'></center></pre></bdo></b><th id='b1eMI'></th></span></q></dt></tr></i><div id='b1eMI'><tfoot id='b1eMI'></tfoot><dl id='b1eMI'><fieldset id='b1eMI'></fieldset></dl></div>
                          <bdo id='b1eMI'></bdo><ul id='b1eMI'></ul>
                            <tfoot id='b1eMI'></tfoot>