UIPickerView - Unable to tap item to select in ios7

一世执手 提交于 2019-12-08 01:54:46

问题


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.

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.

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.

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?


回答1:


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

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.

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/



来源:https://stackoverflow.com/questions/20887001/uipickerview-unable-to-tap-item-to-select-in-ios7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!