eBay/NMessenger

Taping on message action

Opened this issue · 2 comments

Is there a way to get response when I tap on message? For example I received an image and would like to tap on it and have it in fullscreen.
All I need is to determine what message I tapped and if it's a picture message I want to have access to that UIImage.
Is something like this even possible with this library? Since it is not using any indexPath technique so I have no clue what to do
Please give some reasonable help
Thank you!

@atainter Any words on that?

@yarodevuci I think you could for example:

  • Add a method to the ContentNode class via extension (e.g. respondToTap())
  • Create a ImageContentNode subclass and override this method to do what you want (you'll maybe need to hold a reference to your view controller, like in the TextContentNode class, via the corresponding initializer)
  • Create a MessageNode subclass, and make it call the responseToTap method of its contentNode attribute when you tap it (by overriding viewDidLoad for example)

And you should be good. It's not really straightforward, but it should work.