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

Elliott Dahle
Elliott Dahle
1,278 Points

Adding commenting ability in the self-destructing messaging app

Is there a straightforward way to add commenting ability to images shared in the Ribbit app? I started browsing the Parse documentation, and saw a photo sharing app tutorial which goes over adding comments, but it seems like it's pretty specific to that app.

Thanks!

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Are you looking to add captions to photos you capture, comments from the sender that go along with the photo, or comments from the recipients that go back to the sender? Either way, this is an exciting idea! I hope you pursue it and get something cool working.

The Parse side of it should be pretty straightforward. You'll just need to create new fields in the Messages class to store the text data and associate it by the object_id of the message. For comments from recipients you might want to make a new Comments class that is related by the object_id of the message.

Capturing and displaying the data on the phone is a little more complex, depending on what you want to do. Adding captions on top of the photo requires some fairly complex customization after you capture the photo, though there are good solutions on GitHub for this.

Adding comments after the photo is captured could be pretty straightforward by showing another view controller or maybe even presenting a modal view controller that collects text input from the user.

Adding comments from recipients would require a change to the ImageViewController that displays the image.

Elliott Dahle
Elliott Dahle
1,278 Points

Yep, basically I was going have a comment shown as sub / detail text on the cell in the inbox view. I'll have to keep messing around with it!

One thing I noticed, is that when I have the simulator open, and I log in and edit friends, send a message, etc. it all works fine, but when I log out, and log back in as a different user, the edit friends doesn't properly update the Friends view. I am not sure as to why it would work for the user I log in as first, but not subsequent users?

Also, a side question: are you guys planning on doing anything with the new Sprite Kit in Xcode 5?

And finally, I wanted to say that I think you guys do an amazing job! The quality of your tutorials is far better than anything else I've come across! Thanks for being awesome!!

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Thanks for the great feedback! And good catch on the bug. I didn't catch it until after publishing the project! :-/ I recorded a fix in the first video of the next project, Implementing Designs for iPhone. Skip to 2:30 for the fix, and I'll add a link to this fix in the Self-Destructing project.

Oh, and we do plan on covering Sprite Kit before too long, but we don't have any hard dates yet. We'll put it on the Roadmap as soon as we have something. :)