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