I am creating a UITableview and apply transformation -M_PI_2 so that the tableview scrolls horizontally.
Each cell is also rotated by M_PI_2 for correct display in the horizontal mode.
The cells are perfect when I initialize it with a data. Everything works fine.
Now I resize the tableview height to 75% of original and move it down my 25%, top half of cells are hidden(I have set clipstobounds on tableview).
I resize the frame of the uitableview using the function setFrame:
This doesn’t change even after [tableview reload].
Since the parent(tableview) is moved and resized, shouldn’t the child(cells) be moved relative to that?
If not, what is the right way to do the following:
- Populate a uitableview and tranform for horizontal scrolling
- Resize the frame based on user input
- The cells should also align themselves with respect to the new frame of the uitableview.
When you apply a transform like this, you are rotating the layer, and so you need to understand the differences between
CALayergeometry andUIViewgeometryApples Layer Geometry documentation describes this well but basically I think you will need to adjust the anchorPoint value of your views layer