内部编译器错误:总线错误:10

时间:2012-01-24 13:31:39

标签: iphone objective-c ios animation compiler-construction

我已经编写了动画的代码,可以在屏幕上动摇UIImageView,但是虽然语法似乎是正确的,但在构建时我会得到一个模糊的“internal compiler error: Bus error: 10”。知道为什么吗?

-(IBAction)shakeCircle{
    int d = 3;
    [UIView animateWithDuration:0.05
    animations:^{myCircle.center = CGPointMake(myCircle.center.x+d, myCircle.center.y-d);}
    completion:^(BOOL finished){
    [UIView animateWithDuration:0.05
    animations:^{myCircle.center = CGPointMake(myCircle.center.x-d, myCircle.center.y+d);}
    completion:^(BOOL finished)
    {
        //but if I comment from here..
        [UIView animateWithDuration:0.05
        animations:^{myCircle.center = CGPointMake(myCircle.center.x+d, myCircle.center.y-d);}
        completion:^(BOOL finished){
        [UIView animateWithDuration:0.05
        animations:^{myCircle.center = CGPointMake(myCircle.center.x-d, myCircle.center.y+d);}
        ];
        }
        ];
        //... to here the code will build.

    }
    ];
    }
    ];
}

请注意,如果我注释掉动画代码的最后五行,那么一切都很好......那个还在继续吗?

我尝试过切换到不同的编译器,但是没有用。我确保只有一个myCircle并且它被引用的唯一时间是它被声明的时候,并且在那个方法中!

0 个答案:

没有答案