UIViewController のプッシュ & ポップの問題に直面しています。私は 2 つの UIViewControllers にA
&と言いB
ます。
私は好きなものからIBAction
プッシュするものを書いていますB
A
B *bView=[[B alloc] initWithNibName:@"B" bundle:nil];
[UIView beginAnimations:@"animation" context:nil];
[UIView setAnimationDuration:0.7];
[self.navigationController pushViewController:bView animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
[bView release]; //Problem is here, If I comment this line, it works fine! else it crashes after my some transitions from A [push] B, B [pop] A.
今、B
私は以下のようIBAction
にポップするA
ように書いています
[UIView beginAnimations:@"animation" context:nil];
[UIView setAnimationDuration:0.7];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[self.navigationController popViewControllerAnimated:NO];
[UIView commitAnimations];
[super dealloc]
からも電話がかかってきましたB
-(void) dealloc
{
[super dealloc];
}
解放bView
しないと、dealloc が呼び出されず、メモリの問題が発生する可能性があります。
この問題は、適用したアニメーションが原因ですか?
autorelease
、 setなどの他のすべての方法を試しましbView=nil;
たが、うまくいきません!
任意のヘルプ、提案!