-1

I have a UITableView and I set its contentMode to bottom. I expected when the orientation changes, the bottom part of the UITableView will stay foot and the top part will change.

Yet this doesn't happen.

I printed the content mode on the willRotate method and it seems fine.

Any ideas what could bother it?

Jagat Dave
  • 1,643
  • 3
  • 23
  • 30
Nimrod Shai
  • 1,149
  • 13
  • 26

2 Answers2

0

Actually, contentMode for UITableView does not work that way.

If you need the first cell on a bottom, you need to apply M_PI rotation affine transform to your tableView and then rotate each cell back on M_PI.

Anton Tyutin
  • 626
  • 1
  • 5
  • 15
0

I don't think contentMode is what you're after. That property usually only has an effect on more granular views, like a UIImageView.

It sounds like you're wanting to control how the view is scaled and stretched, I think what you're looking for is iOS's 'auto layout' feature. You can get started here: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/

Jordan Smith
  • 10,310
  • 7
  • 68
  • 114