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 Build a Photo Browser iPhone App UIKit Dynamics Extra Credit

Extra credit Photobombers

hey! I am trying to get the UIAttachmentBehavior class thingy to work and it doesn't can some one help?

this is my code

  • (void)viewWillAppear:(BOOL)animated { [super viewDidAppear:animated];

    UIAttachmentBehavior *attach = [[UIAttachmentBehavior alloc]initWithItem:self.imageView attachedToAnchor:self.view.center]; attach.frequency = 0.8; attach.damping = 0.2; attach.length = 7; [self.animator addBehavior:attach];

    UISnapBehavior *snap = [[UISnapBehavior alloc] initWithItem:self.imageView snapToPoint:self.view.center]; [self.animator addBehavior:snap];

}

and for the other bits I am really confused about how to start doing them! (I don't wanna break the app!)

Ben!

Sam Soffes Amit Bijlani

(sorry if I'm being really stupid!!)

2 Answers

I've got basically that same code apart from the 'point' bit and it won't work :/ and then i tried that and it still doesn't work! :/