开发者

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

开发者 https://www.devze.com 2023-03-03 00:10 出处:网络
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

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消