Mobilewits
Mobilewits

Reputation: 1763

How to rearange the UItableViewCell's subviews on device rotation?

I have an iPad app in which I have a tableView. The contents of the tableviewcell are five images in landscape mode and 4 images in portrait mode. I have the customCell and i am calling setNeedsLayout and overiding layoutSubviews method in there to re add the images with new frame. But no luck. Any samples or suggestions would help.

Thanks

Upvotes: 3

Views: 289

Answers (1)

Shanti K
Shanti K

Reputation: 2918

Reload the tableview. And cellForRowAtIndexPath:, check the orientation and add 5/4 depending on the orientation.

Upvotes: 1

Related Questions