This is my code in my application, 

```
    [imageview setAlpha:1.0f];
    [imageview setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@.png",[pages objectAtIndex:swipeCount]]]];
    [imageview setFrame:CGRectMake(-300, 0, 1368, 1000)];

```

Edit:

```
      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];

```

its working properly, problems except when the app enters background and comes back to foreground shows the following error,

```
  *** -[UIImage isKindOfClass:]: message sent to deallocated instance 0x1e8b10

```

What wrong with the code?
Please help me out