Messagekit: Adding Buttons Below/Within Messages

Created on 22 Jul 2018  路  4Comments  路  Source: MessageKit/MessageKit

Hi there! Thanks for the great work!
I'm a novice iOS dev with a small doubt more about something I am trying to do than an issue with the project - not sure if this the best place to post this but wasn't sure where else to ask.

I want to add a set of buttons below/or inside certain messages (whichever is more doable!) in the place where the bottom text would be. However, I am not sure about how to go about doing this. I was just wondering what would be the best way to implement such a feature? I'm very new to iOS and am just looking for guidance as to where to get started with creating this.

question

Most helpful comment

It's all good @svmadiraju. The only stupid question is the one that wasn't asked. We're glad you could resolve this issue, I'm going to close this for now 馃憤

All 4 comments

Hi @svmadiraju

This is the right place to ask! To do this it sounds like you need to add a custom cell. Another user posted a how to in an issue about custom cells you could look at for reference.

I am still working on a more revised example projects to show how to add a custom cell.

What you will need to do is subclass the MessagesCollectionViewLayout and return a custom size calculator for the messages you want to have buttons with, as they will need to be bigger than default.

Try first to add a basic custom cell and go from there. If your code is posted on GitHub I would be willing to help with any specifics.

Sent with GitHawk

Hey @nathantannar4
Thanks for the response! I am trying to work with adding a custom cell, but am currently very confused. I will refer to the issue you mentioned and see how it should be done. Revised examples showing this would be great as well!

Also thanks for offering to help! If I am still stuck I will definitely reach out again.

Edit: Never mind, I figured it out. That really was a stupid question haha.

It's all good @svmadiraju. The only stupid question is the one that wasn't asked. We're glad you could resolve this issue, I'm going to close this for now 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omaralbeik picture omaralbeik  路  4Comments

Leon12345679 picture Leon12345679  路  3Comments

Abacaxi-Nelson picture Abacaxi-Nelson  路  4Comments

TheDarkCode picture TheDarkCode  路  3Comments

nitrag picture nitrag  路  3Comments