Swift parse query results not appearing in tableview

前端 未结 1 1482
终归单人心
终归单人心 2021-01-07 08:28

I am running into difficulty displaying the data from the query I made in the individual cells of my tableview. I believe that my logic is correct, but I\'m not seeing the c

相关标签:
1条回答
  • 2021-01-07 08:59

    I fixed the issue. I needed to cast the index path row in the users array as a PFUser and then cast the user's username property as a String and then set that as the label text.

            let row = indexPath.row
    
            var user = userArray[row] as! PFUser
            var username = user.username as String
    
            cell.usernameLabel.text = username
    
    0 讨论(0)
提交回复
热议问题