title: JSQMessageViewController - How do I set a collection cell to be incoming or outgoing cell?
body: <p><img src="https://i.stack.imgur.com/ewIW9.png" alt="enter image description here"></p>
  
  <p>Using the JSQMessage podfile for iOS, in this method;</p>
  
  <p>collectionView:(JSQMessagesCollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
  ..
  }</p>
  
  <p>How do I set the it to use <code>JSQMessagesCollectionViewCellIncoming</code> or <code>JSQMessagesCollectionViewCellOutgoing</code>?  I am finding it diffcult to find examples of how other apps do this</p>
  
  <p>My code;</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(JSQMessagesCollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
  
  
      JSQMessagesCollectionViewCell *cell = (JSQMessagesCollectionViewCell*)[super collectionView:collectionView cellForItemAtIndexPath:indexPath];
  
  
  
      [cell.textView setDataDetectorTypes:UIDataDetectorTypeNone];
      cell.textView.text = nil;
  
      VICChatMessage &lt;JSQMessageData&gt; *messageData = (VICChatMessage*)[collectionView.dataSource collectionView:collectionView messageDataForItemAtIndexPath:indexPath];
      cell.textView.attributedText = messageData.attributedText;
  
      return cell;
  }
  </code></pre>