0
我正在使用图像滑块。我的图像宽度超过1300px,那么我怎样才能将它融入到单个屏幕中,目前它在下一个图像索引上重叠。在ICarousel中调整大小滑块图像
我正在使用图像滑块。我的图像宽度超过1300px,那么我怎样才能将它融入到单个屏幕中,目前它在下一个图像索引上重叠。在ICarousel中调整大小滑块图像
使用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;
感谢它的工作,但我已经使用剪辑界限,它的工作。 –