iCarousel
화면 방향 변경 중에 회전식보기에 배치 된 항목의 크기를 조정하는 데 문제가 있습니다. 어떻게 수정합니까?ios에서 화면 방향으로 회전하는 동안 회전식보기 크기 조정
여기 프레임은 그렇지가 영향을주지 것이다 동향 방법에 회전 목마를 다시로드해야 변경 잘 내 코드
- (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:[email protected]"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);
}
}
좋은, 고마워 !!! – dineshsurya
그레이트 :) 해피 코딩 .... – NSUserDefault