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

Workshops - Custom UIViewController Transitions in iOS 7

I'm having the same problem that Amit had at the end of the video and I would like to finish the project without the simulator crashing every time. I tried to download the zip file to see if I could figure it out myself but I'm getting an access denied error when trying to do that on the website.

Here is the error from http://teamtreehouse.com/library/treehouse-workshops/custom-uiviewcontroller-transitions-in-ios-7-2

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>251CEF528D4EA2EB</RequestId>
<HostId>
mV29YG62vg4NGz5uPigjNaXw4m1zs+hUAkPPORRKi0mkCrNEDBzS3lqbzULPepBq
</HostId>
</Error>

and here is the error I'm getting from xcode

2014-02-04 22:07:56.426 tranisitionsDos[37717:70b] -[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
2014-02-04 22:07:56.428 tranisitionsDos[37717:70b] -[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x8a294a0; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x8a1f410>; layer = <UIWindowLayer: 0x8a0fa50>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

2 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Sorry about that you should be able to download the project files now.

Thanks Amit!

My sanity has been saved... for some reason I was missing this snippet in my else statement in the Dynamic Animator implementation... Thanks again Amit!

UIGravityBehavior *gravityBehaviour = [[UIGravityBehavior alloc] initWithItems:@[fromViewController.view]];
        gravityBehaviour.gravityDirection = CGVectorMake(0, 10);
        [self.animator addBehavior:gravityBehaviour];

        UIDynamicItemBehavior *itemBehaviour = [[UIDynamicItemBehavior alloc] initWithItems:@[fromViewController.view]];
        [itemBehaviour addAngularVelocity:-M_PI_2 forItem:fromViewController.view];
        [self.animator addBehavior:itemBehaviour];