[英]What would be the best way of providing small image selection in an iPhone App?
I have a bunch of small png images with about 45 x 45 pixels of size. 我有一堆大小约为45 x 45像素的小png图像。 not really big ones.
不是很大。 there are about 40 of them right now.
现在大约有40个。
I want that the user can select one of them as his avatar image. 我希望用户可以选择其中之一作为他的头像。 For this, I created an brand new view with an controller class.
为此,我创建了一个带有控制器类的全新视图。 Now the problem is: How to display all those images to the user?
现在的问题是:如何将所有这些图像显示给用户? There's no "big view".
没有“大视野”。 When the user touches one of them, it's going to be selected and the view switches back to the main view, where he's going to see his selected image.
当用户触摸其中之一时,将选择该视图,然后视图切换回主视图,在该视图中他将看到自己选择的图像。 When he touches it, the image selection view will appear again.
当他触摸它时,图像选择视图将再次出现。
So I thought about an table view, but it feels not right. 所以我想到了一个表格视图,但是感觉不对。 The images have no title to be displayed, so it would be a big waste of screen space.
图像没有标题要显示,因此会浪费屏幕空间。
Any ideas? 有任何想法吗? Should I programmatically generate a grid of UIImageView objects?
我应该以编程方式生成UIImageView对象的网格吗?
A grid is correct. 网格是正确的。 Think iPhone Photos application.
想想iPhone Photos应用程序。 No need to make a completely new widget though, add multiple image views to table rows, segmenting them.
不过,无需制作全新的小部件,只需将多个图像视图添加到表行中,然后对其进行分段。
网格似乎是一个很好的解决方案,因为它可以在设置中镜像墙纸ui,以便用户知道期望什么。
Another option in this case would be to use a UIPickerView. 在这种情况下,另一种选择是使用UIPickerView。 It takes up less screen space, and can be shown on the main screen (just pop up from the bottom, let them pick one, then disappear).
它占用的屏幕空间较小,并且可以显示在主屏幕上(只是从底部弹出,让他们选择一个,然后消失)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.