【发布时间】:2012-08-17 03:09:08
【问题描述】:
我正在开发一个 UIWebView iPhone 应用程序和移动网站,在该应用程序中我有许多 <select> 菜单,每个菜单包含 100 多个项目!
我想知道是否有办法将<select> 菜单拆分为子菜单,以便 iPhone 用户更轻松地进行选择,例如:
我有这个用于我的数据库设置:
| Subcategory | Food |
--------------------------------------
|eggs and cheese |scrambled |
|breakfast cereal |frosted flakes |
|breakfast cereal |mini wheats |
|breakfast cereal |cherrios |
所以每个项目都有一个“子类别”,然后是实际的“食物”
我将它打印到这样的下拉列表中:
<select class="breakfast">
<option value="100" rel="20">Breakfast Cereal (Frosted Flakes)</option>
<option value="200" rel="10">Breakfast Cereal (Cheerios)</option>
<option value="150" rel="25">Breakfast Cereal (Mini Wheats)</option>
<option value="300" rel="30">2 Eggs and Cheese (scrambled)</option>
</select>
当我触摸 iPhone 上的下拉菜单进行选择时,所有 4 个选项都列在 iPhone 默认的滚轮 UI 中:
我想以某种方式设置它,以便我可以有 2 个滚轮,左侧有子类别,然后一旦你选择它,它就会在右侧为你提供“食物”选项,就像这样(但只有 2 个轮子):
这个例子是左边的滚轮,有两个选项Eggs and Cheese和Breakfast Cereals,然后当用户触摸Breakfast Cereals时,它会将3个谷物选项加载到右边的滚轮选择器UI中!
这有点复杂,但是有没有人有这方面的经验,或者有可能吗??
【问题讨论】:
标签: iphone xcode uiwebview menu