- (IBAction)swipedDown:(id)sender { CGPoint location = [sender locationInView:self.view]; NSLog(@"swiped down at %f, %f", location.x, location.y); NSString *viewName = @"TaskQuickCreateView"; TaskQuickCreateView *view = [[NSBundle mainBundle] loadNibNamed:viewName owner:self options:nil][0]; CATransition *animation = [CATransition animation]; [animation setDuration:0.5]; [animation setType:kCATransitionPush]; [animation setSubtype:kCATransitionFromBottom]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [self.view addSubview:view]; //[animation setDelegate:self]; [[view layer] addAnimation:animation forKey:viewName]; // NSLog(@"view %@", view); // [self.navigationController.view addSubview:view]; // [[self.navigationController.view layer] addAnimation:animation forKey:viewName]; // [UIView transitionWithView:self.navigationController.view // duration:0.5 // options:UIViewAnimationOptionTransitionCrossDissolve // animations:^{ // [self.navigationController.view addSubview:view]; // } // completion:nil]; }