Is it possible to specify an initial offset of the image when using drawAsPatternInRect of the UIImage class?
To clarify what I actually need:
Let’s say I’m drawing an image in the center of a view, using the drawAsPatternInRect. Now if I move this rectangular area around, the drawn background still fills the whole area, but it’s coordinates are fixed, i.e. they do not move with the rect, which makes it look like the drawing area is just a transparent ‘window’ to some static background. What I would like to achieve is to make it look like the background is moving together with the area itself.
I’ve tried using the functions described here, but I didn’t have much success.
Any help would be very welcome.
Invoke it just before invoking drawAsPatternInRect