LvJianfeng / LLCycleScrollView

Swift - 轮播图,文本轮播,支持左右箭头
MIT License
373 stars 65 forks source link

控制上一页下一页的属性 #43

Closed JqyModi closed 6 years ago

JqyModi commented 6 years ago

现在有个需求要在轮播左右加上箭头,但是点击的时候需要控制当前显示的page,找了好久没找到这样的属性,希望下个版本提供一下或者弄个样式选择枚举直接加上左右箭头

LvJianfeng commented 6 years ago

@JqyModi 好了哦,新版本1.5.0

LvJianfeng commented 6 years ago

@JqyModi DEMO代码。

// Demo--带左右箭头
let bannerDemo1 = LLCycleScrollView.llCycleScrollViewWithArrow(CGRect.init(x: 0, y: bannerDemo.ll_y + 205, width: w, height: 200), arrowLRImages: [UIImage.init(named: "ico-two-left-arrow")!, UIImage.init(named: "ico-two-right-arrow")!], imageURLPaths: imagesURLStrings, titles:nil, didSelectItemAtIndex: { index in
    print("当前点击图片的位置为:\(index)")
})

bannerDemo1.customPageControlStyle = .snake
bannerDemo1.customPageControlInActiveTintColor = UIColor.red
bannerDemo1.pageControlPosition = .center
bannerDemo1.pageControlLeadingOrTrialingContact = 28

 // 下边约束
bannerDemo.pageControlBottom = 15
scrollView.addSubview(bannerDemo1)