TXCycleScrollView 0.0.5

TXCycleScrollView 0.0.5

测试测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2017年1月

cocoa-chen 维护。



  • 作者:
  • 陈爱彬

这是一个无限滚动视图,用于 iOS, 会自动滚动到下一页。首先,编辑您的 Podfile

pod 'TXCycleScrollView'

然后按照如下方式编辑您的代码。

self.bannerList = @[
                    @"http://dynamic-image.yesky.com/740x-/uploadImages/2014/188/15/4EABKK639PIS.jpg",
                    @"http://img1.3lian.com/2015/a2/239/d/289.jpg",
                    @"http://img.hb.aicdn.com/66ec45fe337d20fdb5050aaf81048b8975a518aa1a0f7-J9kgSC_fw580",
                    @"http://img0.ph.126.net/Y3AM_Lxfz4fonBDQpNlkSQ==/6597234693400985046.jpg"
                    ];

TXCycleScrollView *bannerView = [[TXCycleScrollView alloc] initWithFrame:CGRectMake(0, 0, 300, 200)];
bannerView.delegate = self;
bannerView.imageUrls = self.bannerList;
[self.view addSubview:bannerView];

TXCycleScrollView *bannerView2 = [[TXCycleScrollView alloc] initWithFrame:CGRectMake(0, 0, 300, 200)];
bannerView2.delegate = self;
bannerView2.autoScroll = NO; //will not auto Scroll
bannerView2.continuous = NO; // infinite will be no
bannerView2.imageUrls = self.bannerList;
[self.view addSubview:bannerView2];