如何在横向模式下查看缩略图? [英] How make a view of thumbnails in landscape mode?

查看:135
本文介绍了如何在横向模式下查看缩略图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个视图,显示一堆图像(类似于照片应用程序)。



在顶部区域是全尺寸图像,在底部的图像列表。



假设存在100张图片。现在,用户是在15-20图像部分,并在图像上16。



现在,我的问题是如何aproach这。我想要的东西,像UITableView控件,但在横向模式...



任何想法?

实际上,如果我正确理解你的需要,你仍然可以使用UITableView滚动图片列表。



若要执行此操作,请创建一个UITableView并旋转它90度使用CGAffineTransform。例如,以下代码创建一个表,旋转它并将其放在屏幕底部:

  UITableView * imageTable = [[UITableView alloc] initWithFrame:CGRectMake(215.0f,30.0f,50.0f,480.0f)]; 
imageTable.transform = CGAffineTransformMakeRotation(M_PI / 2.0f);
[self.view addSubview:imageTable];

然后你可以简单地使用每个行单元格的image属性将图像放在表格行中(记住旋转图像90度在表视图的相反方向)。


I have a view with the task to show a bunch of images (similar to the photos app).

In the top area is the full-size image and in the bottom a list of images.

Let's say exist 100 images. Now the user is on the 15-20 image section and is on the image 16.

Now, my problem is how aproach this. I wanna something that work like the UITableView control but in landscape mode...

Any idea?

解决方案

Actually, you should still be able to use a UITableView for your scrolling list of images, if I understand your needs properly. You want to have a scrolling list of single images along the bottom of the screen, like you see in something like Aperture.

To do this, create a UITableView and rotate it 90 degrees using a CGAffineTransform. For example, the following code creates a table, rotates it, and places it at the bottom of the screen:

UITableView *imageTable = [[UITableView alloc] initWithFrame:CGRectMake(215.0f, 30.0f, 50.0f, 480.0f)];
imageTable.transform = CGAffineTransformMakeRotation(M_PI / 2.0f);
[self.view addSubview:imageTable];

You then could simply place your images in the table rows using each row cell's image property (remembering to rotate the images 90 degrees in the opposite direction of the table view).

这篇关于如何在横向模式下查看缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆