问题
I have a UIPickerView
that I would like to change the size of frame. It seems that no matter how small I want it there is set minimum size that I can't go smaller than. I have seen other posts about this but they are very old and the code is much different now. I know how to adjust the height and width of the rows in the picker view but not the frame itself. Even in the Frame Inspector no matter what I change on the height and width it will not go smaller than a certain size.
回答1:
You can't change the size of a UIPickerView without doing strange hacks. The class is written for specific dimensions and if you do hack it to change the size it leads to weird issues.
I would suggest you use the iCarousel library to implement a custom picker view.
来源:https://stackoverflow.com/questions/30386005/changing-the-size-of-my-uipickerview-in-swift