更改UIPickerView行高 [英] Changing UIPickerView row height
问题描述
我正在为所上课的班级工作,该程序的一部分要求其中包含图像的UIPickerView
.我已经启动并运行选择器,但是选择器中的行的高度仍然太小,导致图像(100x100)重叠.我正在寻找一种更改UIPickerView
的方法,以使图像适合一行,而不会重叠.谢谢
I'm working on a program for a class I'm taking and part of the program requires a UIPickerView
with images in it. I have the picker up and running, but the height of the rows in the picker are still too small, causing the images (100x100) to overlap. I'm looking for a way to change the UIPickerView
so that the images will fit in one row, without overlapping. Thanks
推荐答案
在 UIPickerViewDelegate 协议.有一种您可以实现的方法,pickerView:rowHeightForComponent:
.
In the documentation for the UIPickerView, you have a link to the UIPickerViewDelegate protocol. There is a method that you can implement, pickerView:rowHeightForComponent:
.
这篇关于更改UIPickerView行高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!