Fathi
Fathi

Reputation: 3

UITableView height when rotating to landscape

I'am trying to change the height of a UITableView when rotating to landscape (in the willRotateToInterfaceOrientation: method), but the change didn't take effect.

It takes an effect when I changed the size in the didRotateFromInterfaceOrientation: method, but it shouldn't be there !

The user will notice the change if I do it after the rotation finished.

Is there any other way to do it ?

Thanks.

Upvotes: 0

Views: 456

Answers (1)

thealch3m1st
thealch3m1st

Reputation: 282

Did you check your autoresizing masks? If you set the properly, it will scale the table view for you automatically. If you have autoresizing masks enabled and you're changing the frame it might mess things up since it's scaling it automatically too. Try setting it to:

UIViewAutoresizingNone

Upvotes: 1

Related Questions