I had to create a control which displays the image chosen by the user in a rectangular frame and also allows her to scroll and zoom it. This, I have accomplished by adding a UIImageView as a subview of a UIScrollView. Now, in a new layout, the container view has to be triangular and the portion of the image going outside the container must be cropped. The user must still be able to scroll and zoom it.
How can this be done? I have rendered static images using image masks, but can the same be used over zoomable and scrollable images? Or is there some other way to do this?