繁体   English   中英

在 UITableview 中添加动态 UILabel 并使用动态高度展开折叠单元

[英]Add dynamic UILabel inside UITableview with Expend Collapse Cell with dynamic height

这是我的回复 json 我需要动态添加附件名称和类型(不使用情节提要),如果附件计数 == 0,则不应显示附件名称/类型视图

[{
    "Name": "Name1",
    "attachement": [{
            "imagename": "Name 1",
            "imagetype": "Png "
        },
        {
            "imagename": "Name 2",
            "imagetype": "Jpeg "
        }
    ],
    "DetailView": "This is sample detailview Example with very long information"
},
{
    "Name": "Name1",
    "attachement": [{
        "imagename": "Test Image 1",
        "imagetype": "Png "
    }],
    "DetailView": "This is sample detailview Example with very long information"
},
{
    "Name": "Name1",
    "attachement": [],
    "DetailView": "This is sample detailview Example with very long information"
}

]

这是我的看法

折叠案例:

UITableview
--Cell
---- Name Label

循环附件后展开案例以显示在 UILabel 上:

 UITableview
    --Cell
    ---- Name Label
    ---- DetailView Label
      ---- imagename": "Name 1" 
      ---- imagename": "Name 2"

我正在使用此代码以编程方式显示我的展开/折叠 UITableview

暂无
暂无

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

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