Question

I add a PickerView to one of my views in an app, but its size is too small(in height). I find that I cannot drag to make it "longer". How to change its size then?

Was it helpful?

Solution

The only way is by adjusting the pickerView.frame.size.height, but you'll get some pretty bad visual artifacts.

I would think long and hard about attempting to circumvent the established design of this control. If you have so many items or your items are too big for this view, a UITableView is probably what you want to go with. It's far more customizable and can handle items/cells of all different shapes and sizes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top