This is my drawInContext method:
UIImage *img = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"]];
CGRect cropRect = CGRectMake(0, 0, 175, 175);
CGImageRef imageRef = CGImageCreateWithImageInRect([img CGImage], cropRect);
CGRect imageRect;
imageRect.origin = CGPointMake(0, 0);
imageRect.size = CGSizeMake(175, 175);
CGContextDrawImage(UIGraphicsGetCurrentContext(), imageRect, imageRef);
CGImageRelease(imageRef);
My image is upside down, how can I change it? What's wrong with my code? How can I change the image become normal?? thx .