2016-07-28 83 views

回答

0

使用carouselItemWidth代表可能会有帮助,

用途:

- (CGFloat)carouselItemWidth:(iCarousel *)carousel; 

一样,

- (CGFloat)carouselItemWidth:(iCarousel *)carousel{ 

    UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 
    if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) 
    { 
     //Handle and return as per your image 
     return 200; //return value that is equal or higher than your CarouselItemView width 
    } 
    else 
    { 
     //Handle and return as per your image 
     return 300; //return value that is equal or higher than your CarouselItemView width 
    } 
} 

您也可以使用以下属性来获取在转盘当前中心项目视图。该视图的索引与currentItemIndex匹配。

@property (nonatomic, strong, readonly) UIView *currentItemView; 
+0

感谢它的工作,但我已经使用剪辑界限,它的工作。 –