UIPickerView - 无法点击要在ios7中选择的项目 [英] UIPickerView - Unable to tap item to select in ios7

查看:226
本文介绍了UIPickerView - 无法点击要在ios7中选择的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS7上,我的应用程序中有一个带有三个组件的UIPickerView(见下图)。刷过时可以旋转所有三个组件。精细!
但是当用户tapps低于或高于当前选定的行时,选择器轮将抽头值旋转到中心。

On iOS7 I have a UIPickerView with three components in my App (see image below). All three comonents can be rotated when swiped across. Fine! But normaly when user tapps BELOW or ABOVE the currently selected row, the picker wheel rotates the tapped value to the center.

中间(黄色)组件bahaves按照预期拍摄时。
但是左右组件表现得很奇怪:不会对下方或上方的水龙头做出反应。它们只能在滑动时旋转 - 但不能在点击时旋转。

The middle (yellow) component bahaves as expected when tapped. But the left and right components behave strange: the do not react to the tap below or above. They can only be rotated when "swiped" - but not when clicked.

见下图:如果我点击值22,23,24上的黄色列或26,27,28这些值旋转到中间。如果我点击12,13,15,16上的红色列 - 没有任何反应。在绿色的那个上:点击68,69,71,72 - 对选择器没有任何改变。

See image below: If I tap on the yellow column on the value 22,23,24 or 26,27,28 these values rotate to the middle. If I tap on the red column on 12,13,15,16 - nothing happens. On the green one also: tapping on 68,69,71,72 - makes no change to the picker.

任何人都可以告诉我,我可以在哪里配置这种行为?
And:为什么默认情况下仅为选择器的中间组件打开?

Can anybody tell me, where I can configure this behaviour? And: Why is it per default switched on only for the middle component of the picker?

推荐答案

更新 :从iOS 7.1开始,下面提到的问题已经修复。

UPDATE: The issues noted below have been fixed as of iOS 7.1.

引入ios7选择器时,功能丢失了很多。 Mark Edwards在8月份对ios7和pre-ios7采摘器之间的差异做了一些有趣的观察,并指出你不能再点击一些物品来选择它们了。这是你看到的问题。马克的形象包括在下面。

There was quite a bit of functionality lost when ios7 pickers were introduced. Mark Edwards made some interesting observations about the differences between the ios7 and pre-ios7 pickers back in August noting that you can no longer tap some items to select them any more. This is the issue you are seeing. Mark's image is included below.

有关ios7选择器更改的详细说明,请访问: http://blog.ittybittyapps.com/blog/2013/09/20/lifting-the-lid-on- ios-7s-uipicker /

A good write-up on ios7 picker changes can be found here: http://blog.ittybittyapps.com/blog/2013/09/20/lifting-the-lid-on-ios-7s-uipicker/

这篇关于UIPickerView - 无法点击要在ios7中选择的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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