更改UIPickerView行高 [英] Changing UIPickerView row height

查看:613
本文介绍了更改UIPickerView行高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为所上课的班级工作,该程序的一部分要求其中包含图像的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

推荐答案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆