Search code examples
iosuitableviewuipickerview

UIPickerView in UITableView doesn't react to touch in lower half of cell


I have a UITableView with one cell only (I will need more later) that contains just a UIPickerView. The single component in the UIPickerView will only scroll when I begin touching it in the top half of the UIPickerView. It will not move at all if my touch starts in the lower half.

I have set the following properties in interface builder for the UITableView:

  • No selection
  • Scrolling disabled
  • Bounces: NO
  • Bounces Zoom: NO
  • Delays Content Touches: NO
  • Cancellable Content Touches: NO

How can I allow touches to scroll the UIPicker from anywhere in the component?


Solution

  • Have faced this issue many times now and it happens usually due to one of the 2 reasons

    1. There is a view on top of the picker's bottom half (try moving the picker to the front in view hierarchy)

    2. The content size of the parent view is not large enough to cover the entire picker. So only the part of the picker present inside this area is handling touches