I have a problem with iCarousel
view to resizing the item placed in carousel view during screen orientation changes.How can i fix this?
Here is my code
- ( void ) handleOrientation:(UIInterfaceOrientation )toInterfaceOrientation {
if (toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
orient = YES;
_deptCarousel.center = CGPointMake(390, 628);
}else {
orient = NO;
_deptCarousel.center = CGPointMake(512, 455);
}
}
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index
{
//create a numbered view
UIView *viewBG = nil;
viewBG = [[UIImageView alloc]initWithImage:[UIImage imageNamed:IS_IPAD?@"Scroll_Placeholder_ImageiPad.png":@"Carousel_Placeholder_Image.png"]];
if (IS_IPAD) {
if (orient) {
viewBG.frame = CGRectMake(0, 0, 420, 350);
}else{
viewBG.frame = CGRectMake(0, 0, 380, 280);
}
} else {
viewBG.frame = CGRectMake(0, 0, 210, 170);
}
}