-(void)add yourViewController{
yourViewController.view.transform = CGAffineTransformMakeScale(1.3, 1.3);
yourViewController.view.alpha = 0;
[UIView animateWithDuration:.35 animations:^{
yourViewController.view.alpha = 0.94;
yourViewController.view.transform = CGAffineTransformMakeScale(1, 1);
}];
yourViewController.view.frame=CGRectMake(0, 0, 320, 480);
[self.view addSubview: yourViewController.view];
}
-(void)removeyourViewController{
[UIView animateWithDuration:.35 animations:^{
yourViewController.view.transform = CGAffineTransformMakeScale(1.3, 1.3);
yourViewController.view.alpha = 0.0;
} completion:^(BOOL finished) {
[yourViewController.view removeFromSuperview];
}];
}
No comments:
Post a Comment