• <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 时上下文无效

        时间:2024-04-14

      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 时上下文无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何“级联"UIImageView 中的图像模式? 下一篇:在 UIImageView 中旋转图像

                  相关文章

                • <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>