I am hoping someone can help with an issue I am having. I have a custom UIView that is placed on the screen. When a button is pushed I would like the image to scroll into view within the bounds of the custom view. I am currently using the below code to slide the image view containing the image down, however the image is not being clipped to within the bounds of the parent view. How can i accomplish this?
Any help would be greatly appreciated.
Code:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:5];
[UIView setAnimationDelegate:self];
CGAffineTransform transform = CGAffineTransformMakeTranslation(0, 160);
currentImage.transform = transform;
[UIView commitAnimations];
Any help would be greatly appreciated.