-1
사전 배열에서 UITableVIew를 채우려고합니다. 이것은 내 tableView/cellForRowAt 메소드입니다. myPosts는 내부에 사전이있는 배열입니다. [indexPath.row]를 사용할 때 형식이 "Any"로 변경되어 dict에서 캐스팅 할 수 없습니다. 제 질문은 indexPath를 사용하여 사전 키 값에 액세스하는 방법입니까?사전의 배열에서 UITableView 채우기 Swift
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! CustomCell
let activePosts = myPosts[indexPath.row]
print(activePosts)
cell.customCellUsername.text = myUser
cell.customCellPost.text =
cell.customCellImage.image =
cell.customCellUserImage.image =
return cell
}