i suggest to use your own method:
something like this:
/* Create your view off the screen (bottom) */
/* NEW EDIT */
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard"
bundle: nil];
UIViewController *myModalController = [mainStoryboard instantiateViewControllerWithIdentifier:@"MyModalController"];
[myModalController.view setFrame: CGRectMake(0, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
[self.view addSubview: myModalController.view]; /* UPDATED HERE! */
/* Animate it from the bottom */
[UIView animateWithDuration:.5 animations:^{
CGAffineTransform move = CGAffineTransformMakeTranslation(0, -[UIScreen mainScreen].bounds.size.height);
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
myModalController.view.transform = move; /* UPDATED HERE */
} completion:^(BOOL finished) {
if(finished) {
NSLog(@"Animation completed");
}
}];
than remove with this animation:
/* Reset animation */
[UIView animateWithDuration:.5 animations:^{
CGAffineTransform reset = CGAffineTransformIdentity;
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
myModalController.view.transform = reset; /* UPDATED HERE */
} completion:^(BOOL finished) {
if(finished) {
NSLog(@"Reset completed");
[myModalController.view removeFromSuperview];
}
}];
--- EDITED --- Sorry, i forgot to add ".view " after myViewController. i never try my code... my fault ;)
The example is updated!