开发者

Calling the same Viewcontroller file from within the file itself

The following segment of code opens a new page "ScreenA" with a animation motion:

                            ScreenA *Acca = [ScreenA alloc];
[UIView beginAnimations:@"flipping view" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown 
        forView:self.view cache:YES]; 
[self.view addSubview:Acca.view];
[UIView commitAnimations]; 

It works fine but what if the call is to the page itself, meaning the file is ScreenA and I am calling the file to open again with different value开发者_运维技巧s to variables imbedded in the code of the file. When a call is made to a page even if it is to itself is all the memory released or is there a potential for a rescursive call that takes place building a stack of pages that will eventually crash the phone?

Really appreciate any help you might give me.

Thanks


I am just showing a code snippet to ask the bigger question about a screen calling itself. Please reconsider for an answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜