简体   繁体   English

在iPhone App中提供小图像选择的最佳方法是什么?

[英]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.

相关问题 在网络上提供也适用于iPhone / iPad的视频的最佳方式是什么? - What is the best way of providing videos on the web that also work on iPhone/iPad? 允许用户从iPhone应用程序的游戏列表中进行选择的最佳方法是什么? - What would be the best way to allow users to select from list of games for an iphone app? iPhone显示许多小图像实例的最佳方法 - iPhone Best Way To Display Many instances Of Small Image 在iPhone应用程序中绘制椭圆的最佳方法是什么? - What is the best way to draw this ellipse in an iPhone app? 更新iPhone应用程序数据的最佳方法是什么? - What is the best way to update data for an iPhone app? 保存iPhone应用程序设置的最佳方法是什么? - What is the best way to save iphone app settings? 编写混合iPhone应用程序的最佳方法是什么? - What is the best way to write a hybrid iPhone app? 为iPhone和iPad拥有相同图像的最佳方法是什么? - what is the best way to have the same image for the iphone and ipad? 为iPhone应用程序创建Default.png图像的最佳方法 - Best way to create Default.png image for iPhone app 我将要投放市场的加密iPhone应用程序的最佳方法是什么? - What is the best way to encrypt an iPhone App that I will put on the market?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM