- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if((self.interfaceOrientation == UIDeviceOrientationLandscapeLeft) || (self.interfaceOrientation == UIDeviceOrientationLandscapeRight)){
Add1.contentStretch=CGRectMake(0.00,0.00,1024.00,66.00);
background.image = [UIImage imageNamed:@"back2-landscape.png"];
} else if((self.interfaceOrientation == UIDeviceOrientationPortrait) || (self.interfaceOrientation == UIDeviceOrientationPortraitUpsideDown)){
Add1.contentStretch=CGRectMake(0.00,0.00,768.00,66.00);
background.image = [UIImage imageNamed:@"back2-portrait.png"];
}
// Return YES for supported orientations
return YES;
}
В этом коде я получаю EXC_BAD_ACCESS в точке
if((self.interfaceOrientation == UIDeviceOrientationLandscapeLeft) || (self.interfaceOrientation == UIDeviceOrientationLandscapeRight))
Скажите, пожалуйста, почему я получаю эту ошибку?