私は現在、私の解析サーバに格納された情報(ユーザー名、説明、プロフィール画像)現在ロードテーブル
...とのtableViewを投入しようとしているを表示する前にパースからのすべてのデータを、私は私がテーブルビューを開くと、情報を表示することはできませんが、戻るをクリックしてテーブルを開くと、すべての情報が表示され、その理由が分かりません。
Aは、最初の解析から必要なすべての情報を取得し、そのような配列にそれらを格納します。
let query = PFQuery(className: institutionTitle)
query.findObjectsInBackground {
(objects, error) in
if error == nil {
// The find succeeded.
// Do something with the found objects
if let objects = objects {
for object in objects {
self.postGrabber.append(object)
self.pSenderUsername.append(object["sender"] as! String)
self.pPostBody.append(object["textPost"] as! String)
}
}
} else {
// Log details of the failure
print("Error: \(error!)")
}
}
私は現在viewDidLoad()
とviewWillAppear()
私は、デリゲートとデータソースを設定
reloadData()
の両方を使用していますテーブルビューの
viewDidLoad()
機能ですべてのデータが正常にロードされたとされるまで
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell: UniversityFeedCellTableViewCell = tableView.dequeueReusableCell(withIdentifier: "postCell", for: indexPath) as! UniversityFeedCellTableViewCell
cell.sender.text = pSenderUsername[indexPath.section]
cell.senderPost.text = pPostBody[indexPath.section]
cell.profilePicture.layer.cornerRadius = cell.profilePicture.frame.size.width/2
cell.profilePicture.layer.borderColor = UIColor.orange.cgColor
cell.backgroundColor = UIColor.white
return cell
}
私は、ユーザーの待ち時間になるだろう方法についていくつかの情報を探しています:
私は、テーブルの上に各セルを設定するためにcellForRowAtIndexPathメソッドを使用します人口が多い。助けていただければ幸いです。
ありがとうございました。私自身より多くの情報をリクエストしてください。
これは主にテーブルに読み込まれていない画像です。 –