Created
July 24, 2013 14:43
-
-
Save minch/6071240 to your computer and use it in GitHub Desktop.
Add sub view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment