Swift - 圖片無線輪播-混編SDCycleScrollView(本人親測)

來源:互聯網
上載者:User


項目裡面的引導頁 三張輪播圖需要用到無線輪播

以前OC的用的是SDCycleScrollView

這裡使用混編,也是第一次用 踩坑


    var cycleScrollView:SDCycleScrollView!  

        

        let imgOne =UIImage.init(named:"launch_1")

        let imgTwo =UIImage.init(named:"launch_2")

        let imgThree =UIImage.init(named:"launch_3")

        

        let imArr = [imgOne,imgTwo,imgThree]

        cycleScrollView =SDCycleScrollView.init(frame:CGRect.init(x:0, y: 0, width:App_Width, height: App_Height), imagesGroup: imArr)

        cycleScrollView.showPageControl =false

        cycleScrollView.autoScrollTimeInterval =1

        view.addSubview(cycleScrollView)

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.