How do you shrink a UIPickerView on the iPhone?

后端 未结 5 2021
梦毁少年i
梦毁少年i 2020-11-29 00:22

I would like to reduce the height of a UIPickerView in my iPhone app, so that it shows only one row and one column. The height of the picker view should be equ

5条回答
  •  感动是毒
    2020-11-29 00:53

    Create a simple UIView in Interface Builder. Set desired position and size, add constraints. Check "Clip SubViews" checkbox. Then drag & drop Picker View inside this view as a subview. Add constraints for picker to align horizontally and vertically inside container. Should do the job.

提交回复
热议问题