ios - 无法在表格视图中打印 Google+ 响应
问题描述
我收到 Google+ 回复,但我不明白如何在 Swift 中打印数组 ito 对象的回复,这是我的回复
回复
{
access={
description=Public;items=({
type=public;
});
kind="plus#acl";
};
actor={
displayName="David Cortex";
id=109312437164671299520;
image={
url="https://lh4.googleusercontent.com/-ThgEmnPFYYk/AAAAAAAAAAI/AAAAAAAAACQ/WPsSVrwV2QU/photo.jpg?sz=50";
};
url="https://plus.google.com/109312437164671299520";
verification={
adHocVerified="UNKNOWN_VERIFICATION_STATUS";
};
};
etag="\"jb1Xzanox6i8Zyse4DcYD8sZqy0/xVZBlUo9r9epJ_89TXvxLKINDpQ\"";
id=z12wxpaqqu2rhrse523wthozexffxnhke;
kind="plus#activity";
object={ **i want to print attachments data like image reshares and replies but not able to understand how to do that**
actor={
verification={
adHocVerified="UNKNOWN_VERIFICATION_STATUS";
};
};
attachments=({
content="gplus-2128611415.jpg";
displayName="Test Post";
fullImage={
height=480;
type="image/jpeg";
url="https://lh3.googleusercontent.com/-CPumbzy2aCw/W2gUJhHp8eI/AAAAAAAAALk/nHPiSw2M8vkCSMbcsH9Mjq26ZLhQYrGggCJoC/w480-h480/gplus-2128611415.jpg";
width=480;
};
id="109312437164671299520.6586536608771207650";
image={
type="image/jpeg";
url="https://lh3.googleusercontent.com/-CPumbzy2aCw/W2gUJhHp8eI/AAAAAAAAALk/nHPiSw2M8vkCSMbcsH9Mjq26ZLhQYrGggCJoC/w506-h750/gplus-2128611415.jpg";
};
objectType=photo;url="https://plus.google.com/photos/109312437164671299520/albums/6586536610238804449/6586536608771207650";
});
content="Test Post";
objectType=note;plusoners={
selfLink="https://www.googleapis.com/plus/v1/activities/z12wxpaqqu2rhrse523wthozexffxnhke/people/plusoners";
totalItems=0;
};
replies={
selfLink="https://www.googleapis.com/plus/v1/activities/z12wxpaqqu2rhrse523wthozexffxnhke/comments";
totalItems=0;
};
resharers={
selfLink="https://www.googleapis.com/plus/v1/activities/z12wxpaqqu2rhrse523wthozexffxnhke/people/resharers";
totalItems=0;
};
url="https://plus.google.com/109312437164671299520/posts/CfnxAnsjzxp";
};
provider={
title="Google+";
};
published="2018-08-06T09:25:58.775Z";
title="Test Post";updated="2018-08-06T09:25:58.775Z";
url="https://plus.google.com/109312437164671299520/posts/CfnxAnsjzxp";
verb=post;
}
现在在这里我展示我尝试过的代码
代码
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! GooglePostListTableViewCell
let instaResponse = serviceData[indexPath.row]["actor"] as! [String:Any]
let fName = instaResponse["displayName"] as! String
cell.lblUserName.text = fName
let object = serviceData[indexPath.row]["object"] as! [String : Any]
let content = object["content"] as! String
cell.lblPostDesc2.text = content
// let object = serviceData[indexPath.row]["attachments"] as! [String:Any]
// let content = object["content"] as! String
// cell.lblPostDesc2.text = content
let gplus = serviceData[indexPath.row]["object"] as! [String:Any]
let plusoners = gplus["attachments"]!["plusoners"] as! String
cell.lbl2.text = plusoners
return cell
}
所以我的意思是我想在数据中打印对象和附件的数据,所以请任何人帮我解决这个问题。
所以我的意思是说如何在对象中的数据中打印附件,所以请帮忙。
解决方案
推荐阅读
- python - 正则表达式在 SQL 中获取值
- reactjs - 在 React 中使用 refs 和 portals 从子级渲染到父级
- mysql - 如何检查用户在文本框中输入的用户名和密码是否与数据库中的记录匹配
- java - 数组列表
使用 set 方法时输出错误的结果 - tsc - 无法将类传递给辅助方法
- java - 基于TableColumn(JavaFX)中的另一个对象属性显示对象属性?
- azure - 通过 Powershell cmdlet Get-AzureRMDeployment 下载 Azure 服务配置 (.cscfg)
- labview - 实验室视图中的并行编程是否可能?
- javascript - React Native - Vimeo/Youtube 视频下载以供离线观看
- c++ - C++ 使用 Keccak 库