eBay/NMessenger

Message full width of screen

Closed this issue ยท 5 comments

I want to send a message using this method: sendCollectionViewWithNodes(..)
I want this message to be full width of the screen. How do I change the width of the Message in the Tableview?
simulator screen shot - iphone x - 2018-03-26 at 15 37 49

Solved it: changing the ratio in the following line to 1:
contentNode?.style.maxWidth = ASDimension(unit: .points, value: width * CGFloat(maxWidthRatio))

@magicmikek , please close this GitHub issue since you've solved it. Thanks.

@dodikk do we have any method to get this message by tapping on it ? Like to open it in full view. And how to achieve pagination ? i.e to load more chat from history.

@munsifhayat

@dodikk do we have any method to get this message by tapping on it ?

  1. It is possible to add gesture recognizers to your message nodes.
  2. There is protocol MessageCellProtocol with func avatarClicked()
  3. You can try to override ASTableDataSource methods of class NMessenger in a subclass.
- (void)tableNode:(ASTableNode *)tableNode didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

I used [1] gesture recognizers since not all elements of my message GUI had to be clickable.

@munsifhayat

And how to achieve pagination ? i.e to load more chat from history.

https://github.com/eBay/NMessenger#head-prefetching