This next question is the direction of the gradient from left to right.
In this example, the apple fix code
Apple Reflection Example
when the size slider moves, the image is cut from bottom to top. How can I cut it from top to bottom when the slider is moved? I'm trying to better understand this tutorial.
//I know the code is in this section here but I can't figure out what to change - (UIImage *)reflectedImage:(UIImageView *)fromImage withHeight:(NSUInteger)height { ... } //it probably has something to do with this code. //I think this tells it how much to cut. //Though I can't figure out how does it know where the 0,0 of the image is and why // keep 0,0 of the image on the top? I am assuming this is where it hinges its //point and cuts the image from bottom to top CGContextRef MyCreateBitmapContext(int pixelsWide, int pixelsHigh) { CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); // create the bitmap context CGContextRef bitmapContext = CGBitmapContextCreate (NULL, pixelsWide, pixelsHigh, 8, 0, colorSpace,(kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst)); CGColorSpaceRelease(colorSpace); return bitmapContext; }

What to do if the image for reflection was on top. Therefore, to show this correctly, I need to open it from top to bottom, and not from bottom to top. This is the effect that I am trying to achieve. In this case, I just moved the UIImageViews in my storyboard example. Now you see my dilemma
Sam b source share