SHARE
TWEET

Untitled

a guest Apr 26th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Tableview functions required.
  2. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  3.     //change later
  4.     return messages.count
  5. }
  6.  
  7. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  8.     let cell = tableView.dequeueReusableCell(withIdentifier: "MessageCell") as! MessageCell
  9.  
  10.     cell.messageLabel.text = messages[indexPath.row].message
  11.     cell.usernameLabel.text = messages[indexPath.row].username
  12.  
  13.  
  14.     return cell
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top