有谁能告诉我这段代码有什么问题..
-(void)newanim
{
MotherView.alpha = 0;
[animationContainer1 removeFromSuperview];
[animationContainer removeFromSuperview];
animationContainer1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
int numberOfImages = 4;
[NSTimer scheduledTimerWithTimeInterval:numberOfImages*1.5f target:self selector:@selector(callMethod) userInfo:nil repeats:NO];
UIImage *image = [UIImage animatedImageNamed:@"Throw_" duration:numberOfImages*1.5f];
animationContainer1.tag = 54;
animationContainer1.image = image;
[AnimationView addSubview:animationContainer1];
// Do any additional setup after loading the view, typically from a nib.
}
-(void)callMethod
{
NSLog(@"AnimationOver");
UIImageView *aTempImageView = (UIImageView *)[self.view viewWithTag:54];
[aTempImageView removeFromSuperview];
[self DefaultPosition];
}
因为当我在模拟器中运行时..它按预期运行..但是当它在iphone中构建时... iphone崩溃..我还在我的图像中应用了“@ 2x。”(320x480和640x960 )每个图像大小是64kB ..我不知道发生了什么..谢谢