开发者

Why is my application freezing when changing views?

开发者 https://www.devze.com 2023-03-08 05:06 出处:网络
I have this same code at the end of each view to go to the next: - (IBAction)proceed2 { StepThree *one = [[[StepThree alloc] initWithNibName:@\"StepThree\" bundle:nil]autorelease];

I have this same code at the end of each view to go to the next:

- (IBAction)proceed2 {
    StepThree *one = [[[StepThree alloc] initWithNibName:@"StepThree" bundle:nil]      autorelease];
    one.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    [self presentModalViewController:one animated:YES];
}

This has worked in every view except this one, and all of my code looks exactly the same except for different step numbers (not always StepThree). I imported "StepThree.h" just as I did in all of them... why is this o开发者_运维技巧ne giving me problems?

By the way, it is in the line

[self presentModalViewController:one animated:YES];

and the error is "Thread 1: Program received signal: "SIGABRT"."


The code you post seems correct.

The problems arises presumably due to something in StepThree implementation.

A good way to diagnose this kind of bad behavior is enabling "zombies" detection. See here for details.

0

精彩评论

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