ビューコントローラーの遷移を行うために、アプリにこのコードがあります
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];
そしてそれはうまくいきます。しかし、2番目のビューコントローラー内には、このビューコントローラーを非表示にするためのこのコードがあります
[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] と書いたら?? 発売されてます??