views:

39

answers:

1

Greetings... I come in peace, shoot to kill...

I have a container of type UIView (A Grid) and add many sublayers to the layer of the UIView (CALayers representing cells within the grid).

Within the Cell, I render many UIImages at different locations using CGContextDrawImage. I am well aware of the need to Translate and Scale, but the scaling (flipping) is with reference to the superviews (Grid) co-ordiantes and the origin of the Cell CALayer is not (0,0).

Therefore my rendering is all over the shop (mostly off screen). What is the best way to handle the translating and scaling when the UIImage is not at (0,0). Is there an established design pattern I should be using.

A: 

I solved this issue by just manually offsetting the translation by double the y origin.

I must say that I have been underwhelmed by this site as it appears people are happy enough to read but not write.

I won't bother posting questions anymore.

Nader