【问题标题】:How to add UITextField,UITextView,UILabel and UIButton in UITableview like forms iphone?如何像 iphone 一样在 UITableview 中添加 UITextField、UITextView、UILabel 和 UIButton?
【发布时间】:2012-01-09 10:41:50
【问题描述】:

在我的 iphone 应用程序中有 4 个表单。这些表单有 UITextField、UITextView、UILabel 和 UIButton。目前我将这些项目放在 UIScrollView 中。但是,现在我的客户希望表单看起来像“iPhone 设置应用程序”。如何在 UITableView 中放置 UITextView、UITextField、UILabel 和 UIButton?用户需要在此表单中输入他们的详细信息,当用户单击底部的 UITextField 时,tableview 应该向上移动。怎么能做到这一点?请建议我任何示例代码/想法?提前致谢。

【问题讨论】:

    标签: forms uitableview uitextfield uitextview uilabel


    【解决方案1】:

    UITableViewCell 有一个名为 contentView 的视图。
    使用[cell.contentView addSubview:yourView] 将项目添加到您的单元格中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多