ios - Invalid context when creating UIImageView -


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

 < Code> UIImage * backgroundPanel = [[UIImage imageNamed: @ "loginPanelBackground.png"] resizableImageWithCapInsets: UIEdgeInsetsMake (90, 0, 14, 416)]; Self.connexionBackgroundImgView = [[UIImageView alloc] initWithImage: backgroundPanel]; Self.connexionBackgroundImgView.frame = CGRectMake (0, 0, 416, 39); // This line prevollow involves [self. Insert View Insert: Self. Conference Backgammam Img See UpSubview: self.connexionToCreationCompteView];   

This throws this error into the log:

  : CGContextSetBlendMode: Invalid reference 0x0 & lt CGContextSetAlpha: Invalid reference 0x0 < Error & gt:: CGContextTranslateCTM: Invalid Reference 0x0 & lt; Error & gt;: CGContextScaleCTM: Invalid Reference 0x0 & lt; Error & gt;: CGContextGetCTM: Invalid Reference 0x0 & lt; Error>: CGContextSaveGState: Invalid reference 0x0 & lt CGContextClipToRect: Invalid reference 0x0 & lt; Error & gt;: CGContextDrawTiledImage: Invalid Reference 0x0 & lt; Error & gt;: CGContextRestoreGState: Invalid Reference 0x0 & lt; Error & gt;: CGContextGetCTM: Invalid Reference 0x0 & lt; Error>: CGContextSaveGState: Invalid reference 0x0 & lt CGContextClipToRect: Invalid reference 0x0 & lt; Error & gt;: CGContextDrawTiledImage: Invalid Reference 0x0 & lt; Error & gt;: CGContextRestoreGState: Invalid Reference 0x0 & lt; Error & gt;: CGContextGetCTM: Invalid Reference 0x0 & lt; Error & gt;: CGContextSaveGState: Invalid reference 0x0 & lt; Error & gt ;: CGContextClipToRect: Invalid reference 0x0 & lt; Error & gt;: CGContextDrawTiledImage: Invalid Reference 0x0 & lt; Error & gt;: CGContextRestoreGState: Invalid Reference 0x0 & lt; Error>: CGContextRestoreGState: Invalid Reference 0x0   

I had an error on the iPad itself, not with the simulator, I do not understand ..:

I had this problem until I knew that resizableImageWithCapInsets my cap inset argument for: was wrong ???? It did not leave any ineffective area at all (you do not need at least 1x1 pixel which is not covered by the cap). So make sure that:

(insets.left + insets.right) & lt; Width

and

(insets.top + insets.bottom) & lt; Height

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -