简体   繁体   English

在iPad应用中显示JSON中的数据表

[英]Show data table from JSON in iPad app

I have a API which returns JSON: 我有一个返回JSON的API:

{
    "id": 1,
    "name": "A green door",
    "price": 12.50,
    "tags": ["home", "green"]
}

{
    "id": 2,
    "name": "A blue door",
    "price": 13.50,
    "tags": ["work", "blue"]
}

In iPad app, I need to show this in the following data table format: 在iPad应用程序中,我需要以以下数据表格式显示此内容:

id    name          price     tags
1     A green door  12.50     home, green
2     A blue door   13.50     work, blue

I have tried the following https://github.com/brightec/CustomCollectionViewLayout but it does not work. 我已经尝试了以下https://github.com/brightec/CustomCollectionViewLayout,但是它不起作用。

How can it be done? 如何做呢?

You can create a simple table view. 您可以创建一个简单的表视图。 I created a simple example with your data. 我用您的数据创建了一个简单的示例。 Sorry, I don't have time to add comments and the UI is basic. 抱歉,我没有时间添加评论,并且用户界面很基本。
Check the following example: Show data into table view 检查以下示例: 在表视图中显示数据

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

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