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

Following yesterday's live workshop

Hey,

Thanks Amit for yesterday live workshop on Youtube.

It got me thinking about something I want to do in my app.

I have an image in a view. I want it so that when a user taps it, it will sort of run away and bounce against the borders of the view. How do you think I can accomplish that?

Thanks!

1 Answer

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

If your image is not too big then you could make it a custom button with an image. And in the IBAction of that button add gravity and elasticity behaviors. We are going to upload the workshop to bonus content section later today if you want to re-watch it.