简体   繁体   English

目标C:以编程方式使用UITextFields创建多个UIPickerView

[英]Objective C: Create multiple UIPickerView with UITextFields programmatically

I'm trying to create a form screen. 我正在尝试创建一个表单屏幕。 When creating a form screen, I want to add form elements. 创建表单屏幕时,我想添加表单元素。

Ex: I want to add multiple phone like this picture. 例如:我想添加多张手机,就像这张照片。 When I press the Add button, I need to add in order.(The first line fixed. Created initially.) How do I make the dynamic alignment. 当我按下添加按钮时,我需要按顺序添加。(第一行固定。最初创建。)如何进行动态对齐。 Every line I have to align the top. 我必须对齐每一行。 在此处输入图片说明

to build this structure you need to 1.add UITableView object to your main view controller , 2. and for "add button" insert a bar Button item at navigation item . 要构建此结构,您需要1.将UITableView对象添加到主视图控制器中; 2.对于“添加按钮”,在导航项目处插入一个Bar Button项目。 3.if you use dynamic tableview you can just update your data source and add cells dynamically . 3.如果使用动态表视图,则可以只更新数据源并动态添加单元格。

plz tell me the result. 请告诉我结果。

The best way to implement this is to use a UITableView with a custom UITableViewCell. 实现此目的的最佳方法是将UITableView与自定义UITableViewCell一起使用。

As for the picker i worked on something similar that can be found here : https://github.com/jadfeitrouni/JFButtonPicker 至于选择器,我做了类似的工作,可以在这里找到: https : //github.com/jadfeitrouni/JFButtonPicker

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

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