-3

I am having two array's, one is senderArray and other is recieverArray. In both arrays i have Messages data in JSON format.

Now i want to display all data in left(recieverArray) and right(senderArray) of table view.

Something like this - enter image description here

Please suggest me how could i do it.

NSArray
  • 63
  • 1
  • 10

2 Answers2

0

Use tableView's delegate methods.

(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

Set the corresponding array data in cell.

Volker E.
  • 5,911
  • 11
  • 47
  • 64
llch
  • 129
  • 1
  • 3
  • 10
0

NSARRAY, it is possible through TableView CustomCell. In UITableView CustomCell take two labels, set the first label to the right Side and the other label to the left side. Display your JSON parsing data array into this label.

Kevin
  • 874
  • 3
  • 16
  • 34
Ashish Gabani
  • 445
  • 1
  • 5
  • 30
  • i have 100 messages in both arrays i have to show all messages in left and right – NSArray Dec 22 '14 at 11:42
  • @NSArray it is Possible why Not in `(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath` and Set `NumberOf Rows in UITableView` is Your array Count and Set Section is equal to 1. – Ashish Gabani Dec 22 '14 at 11:44
  • @NSArray Then use Custum Libraray [link] (https://github.com/samsoffes/ssmessagesviewcontroller) Hope it Helps You. – Ashish Gabani Dec 22 '14 at 11:59