开发者

How to rotate or transform tableView cell's image

开发者 https://www.devze.com 2023-03-16 17:29 出处:网络
I am supposed to show a lot of images(horizontally one after another) like a gallery in my iPad app. The number of images can vary from 10 to 500 and ev开发者_如何学运维en more. So, i though of using

I am supposed to show a lot of images(horizontally one after another) like a gallery in my iPad app. The number of images can vary from 10 to 500 and ev开发者_如何学运维en more. So, i though of using a tableView to display the images as it helps me to create as less objects as posible. I have created a tableView and rotated it by 90 degrees using CGAffineTransform. Now, i am supposed to rotate even the images to compensate for the rotation of tableView. This is where i am getting struck. I know that i can put my image into a imageView and transform the imageview before assigning it to the tableView cell. But, this would not serve the purpose as this needs a large number of imageViews which would consume a lot of memory.

My questions are

1 - how can i rotate my image before or after assigning it to the tableView cell without using a imageView

2 - Is there any other way in which the above senario can be implemented efficiently with minimum memory consumption


I think the easiest way is to rotate the UITableViewCell to compensate the rotation of the UITableView (also using CGAffineTransform).

I did it once and worked very well.

0

精彩评论

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