广告轮播
self.cyclePlaying = Carousel(frame:CGRectMake(0, 0, screenW, screenH/3))
//设置是否需要pageConrtol
self.cyclePlaying?.needPageControl = true
//设置是否需要无限轮播
self.cyclePlaying?.infiniteLoop = true
//设置pageControl的位置
self.cyclePlaying?.pageControlPositionType = PAGE_CONTROL_POSITION_TYPE_MIDDLE
//设置图片的数组(imageArray和imageUrlArray),如果是本地图片,直接进行设置,如果是网络图片地址,需要请求数据,然后再设置图片
self.cyclePlaying?.imageArray = ["shili1","shili10","shili13","shili19"]
然后再将cycle playing作为tabbleView的HeaderView即可
网友评论