简体   繁体   English

iPhone UI:每个项目带页脚的下拉选择器

[英]iPhone UI: Dropdown Picker with footer for each Item

I've done this on android using custom layouts for menus. 我已经在Android上使用菜单的自定义布局进行了此操作。 How do I create a multiline dropdown Picker where each line item has additional string as footer? 如何在每个订单项都具有附加字符串作为页脚的地方创建多行下拉选择器?

Like this: 像这样:

在此处输入图片说明

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view

You need to implement this delegate method and in it return your custom view. 您需要实现此委托方法,并在其中返回您的自定义视图。

Apple docs 苹果文档

您可以使用pickerView:viewForRow:forComponent:reusingView:委托方法来实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM