这是我的应用程序中的代码,
[imageview setAlpha:1.0f];
[imageview setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@.png",[pages objectAtIndex:swipeCount]]]];
[imageview setFrame:CGRectMake(-300, 0, 1368, 1000)];
编辑:
pages = [[NSArray alloc] initWithObjects:@"page1",@"page2",@"page3",@"page4",@"page5",@"page6",@"page7b",@"page8",@"page9",@"page10a",@"page11",@"page12",@"page13b",@"page14",@"page15",@"page16a",@"page17",@"page18",@"page19",@"page20",@"page21",@"page22",@"page23",@"page24",@"page25", nil];
imageview=[[UIImageView alloc]init];
它工作正常,除非应用程序进入后台并返回前台,否则问题会显示以下错误,
*** -[UIImage isKindOfClass:]: message sent to deallocated instance 0x1e8b10
代码有什么问题?请帮帮我