Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Tableview functions required.
- func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- //change later
- return messages.count
- }
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = tableView.dequeueReusableCell(withIdentifier: "MessageCell") as! MessageCell
- cell.messageLabel.text = messages[indexPath.row].message
- cell.usernameLabel.text = messages[indexPath.row].username
- return cell
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement