1

i am making a simple messenger and my storyboard looks like this: enter image description here

whenever i hit send, the text in my textfield will be stored in Firebase (it's working). now how can i create the tableviewcell so I can load the messages? anyone out there that can guide?

Community
  • 1
  • 1
William Loke
  • 377
  • 1
  • 4
  • 25
  • https://www.letsbuildthatapp.com/course/Firebase-Chat-Messenger This tutorial will walk you through exactly what you are looking to achieve. You could probably skip to around episode 8 or so if you are pretty confident in your Swift structure and easily able to follow tutorials. – Torewin May 02 '18 at 04:20
  • 1
    All depend on your design , how do you want to show , you can easily use two UIViews one for. sender and one for receiver by maintain values in DB that message was sent by Sender or Receiver (UID of user) and in cellforRow method just check data in array is of sender of receiver and show UIViews of cell required by hiding other like for sender , show UIView and label on right side and hide UIview In left – iOS Geek May 02 '18 at 04:20

1 Answers1

0

Crate Custom Tableview cell nib. And see here how to load nib in swift.

See how to load cutom nib in tableview

Manish Mahajan
  • 2,062
  • 1
  • 13
  • 19