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

Add Caption to Self Destructing App

I am trying to add a simple message to the photo the user sends on the self destructing app but i don't know how to start

1 Answer

Stone Preston
Stone Preston
42,016 Points

This should outline what you need to do

You would have to add an additional view controller into your storyboard for after the user takes the photo. Instead of presenting the image picker modally from the view controller where you choose recipients you would present it in this new controller. That view would have an image view that fills the screen (which displays the image the user just captured) and a text field with a clear back ground. The user types their text in then hits a next button that presents the view that let's them select recipients. Once ready to save to parse, you would have to save an additional field, the text of the text field where the caption was typed. Then when displaying the message you just have to add a text label to the view that displays the image and populate it with the message's caption that got saved earlier