Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Ribbit App - Display Sent Messages In InboxViewController

I am trying to modify this app to show all sent messages as well as received messages in the InboxViewController. Ideally I can assign a "status" to each recipient as well - Received, Opened, etc. and change the icon image based on sent/received etc.

I understand this this is a relatively large feature, however the problem I am running into is underlying logic in using the RecipientIDs Array. Will my desired feature require a total rewrite of the Message object when sending? Or perhaps adding a Column to the Messages class which contains a corresponding array to each Recipient ID? In addition to all of this, how do i modify the CellForRowAtIndexPath to include a row for each recipient?

Any help in the right direction would be awesome!

2 Answers

I think the idea would be to automatically send it to the senders inbox with the added tag on it that says something along the lines of "sent". Also if you follow the self-destruct feature then you won't need an "open" status on the messages because they won't exist after looking at them for 10 seconds.

Thanks for the response Caleb!

I am using the app as a framework for a much different app - where I will not be utilizing the self destruct feature. My current thinking is that i will need to loop through the recipientID array and create a separate object for each recipient when sending the messages - however I am open to any ideas that might be more economical.

Okay, it seems like it would work to me, but I haven't done much real life app programming outside of Treehouse ( I'm working on fixing that ), so I'm not exactly sure how you would check the sent messages. I hope you find a solution!