我的应用程序中有这段代码可以为视图控制器进行转换
SecondViewController *second = [[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
[self.view addSubview:second.view];
[second.view setFrame:CGRectMake(320, 0, 320, 480)];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.40]; //the double represents seconds
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[second.view setFrame:CGRectMake(0, 0, 320, 480)];
[UIView commitAnimations];
它工作正常;但在第二个视图控制器中,我有这段代码可以让这个视图控制器消失
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.40]; //the double represents seconds
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[self.view setFrame:CGRectMake(320, 0, 320, 480)];
[UIView commitAnimations];
它工作正常,但是释放它的方法是什么,我在哪里可以释放我调用它时分配的这一秒?如果我写 [self.view removeFromSuperView]?? 发布了吗??