03 RYImagesScroller-iOS高度自定义的图片轮播器
图片轮播
混合轮播实现思路
效果展示
_svImages = [[RYImagesScrollView alloc] initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*3/7) pageStyle:RYImageScrollerPageStyleCustom];
_svImages.autoScrollTimeInterval = 4.0f;
_svImages.contentMode = UIViewContentModeScaleAspectFill;
_svImages.normalPageImage = [UIImage imageNamed:@"outdoor_icon_carousel"];
_svImages.currentPageImage = [UIImage imageNamed:@"outdoor_icon_carousel_selected"];
self.svImages.imageURLs = @[
@"http://cc.cocimg.com/api/uploads/20170407/1491531818350790.png",
@"http://cc.cocimg.com/api/uploads/20170407/1491531897388821.png",
@"http://cc.cocimg.com/api/uploads/20170407/1491531754597727.png",
@"http://cc.cocimg.com/api/uploads/20170407/1491531459990792.png",
@"http://cc.cocimg.com/api/uploads/20170407/1491531504501824.jpg"
];
//这里的意思是在第一页和第三页 添加自定义蒙版视图
self.svImages.attachIndexArr = @[
@0,
@2
];
//这里的意思是在第一页和第三页的 添加自定义蒙版视图数组 蒙版会自适应轮播控件的大小 如果需要自定义位置 最好用一个背景透明的容器装下
self.svImages.attachViewArr = @[
[[UISwitch alloc] init],
[[UISlider alloc] init]
];方法:
Last updated