2016-07-28 62 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

感謝它的工作,但我已經使用剪輯界限,它的工作。 –