Ungültiger Kontext beim erstellen UIImageView

Habe ich eine Fehlermeldung, wenn ich versuchte, die Schaffung eines UIImageView.
Blick auf diese 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];

Wirft er diese Fehlermeldung in der 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

Hatte ich diesen Fehler nur auf dem iPad, nicht mit dem Simulator, die ich nicht verstehe.. :/

Sind Sie mit einer benutzerdefinierten Zeichnung code? wie durch die Verwendung CGContext und alle?
Auch versuchen Sie selbst.connexionBackgroundImgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 416, 390)]; [selbst.connexionBackgroundImgView setImage:backgroundPanel]; Eigentlich sollte es nicht viel Unterschied. Aber immer noch können Sie versuchen.
Ich habe bereits getestet :/
Sind Sie mit einer benutzerdefinierten Zeichnung? die Umsetzung CGContext irgendwo?
Finden Sie die Antwort hier: stackoverflow.com/questions/10695258/...

InformationsquelleAutor seb | 2012-11-01

Schreibe einen Kommentar