1
我想繪製一個圖像到我製作的UIView子類中的屏幕。iphone png文件倒過來
對於我的圖像顛倒過來的事實,這一切都是完美的預期。
我正在使用的代碼...
CGFloat height = CGRectGetHeight(rect);
CGFloat width = CGRectGetWidth(rect);
UIImage *thumbImage = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"single_blue" ofType:@"png"]];
CGImageRef thumbImageRef = thumbImage.CGImage;
CGContextDrawImage(context, CGRectMake((width/10)*[mean doubleValue] - 13, -3, 26, 35), thumbImageRef);
任何想法,爲什麼它的到來了倒掛?
感謝您的任何幫助。
Oliver
::編輯:好吧,所以Safari看起來就像死了。 Chrome雖然工作正常。很奇怪。
http://stackoverflow.com/questions/506622/cgcontextdrawimage-draws-image-upside-down-when-passed-uiimage-cgimage 看到這裏的修復。 Safari死了,打破了堆棧溢出,所以我無法搜索。現在所有更好,但發現這一點:D – Fogmeister 2010-08-26 22:28:06