iOS无限滑动轮播图可竖着滑动

ASRotationPageView

特点

1.可用作轮播图,引导页, 轮播广告 2.可将view用作轮播 3.可横向滑动和纵向滑动

演示

方法介绍

/** 无限轮播 - 默认YES */
@property (nonatomic, assign) BOOL  infiniteSliding;

/** 自动轮播 - 默认YES */
@property (nonatomic, assign) BOOL autoSliding;

/** 轮播图滚动时间间隔 - 默认是5秒 */
@property (nonatomic, assign) NSTimeInterval scrollTimeInterval;

/** 滚动方向 - 默认横向滚动 */
@property (nonatomic, assign) ASRotationScrollDirection scrollDirection;

/** 当前的页码 */
@property (nonatomic, assign) NSUInteger currentPage;

/** 图片未加载出来的占位图 */
@property (nonatomic, copy) NSString *placeholderName;
/** 滑动完成的回调 */
@property (nonatomic, copy) void(^ScrollDidEnd)(NSUInteger currentPage);
/** 点击view的回调 */
@property (nonatomic, copy) void(^SelectView)(UIView *view);

/** 偏移到制定页 */
@property (nonatomic, assign) NSUInteger contentOffsetPage;




/**
 初始化方法

 @param frame frame
 @param images 图片url或图片名称或UIView
 @return 对象
 */
- (instancetype)initWithFrame:(CGRect)frame images:(NSArray *)images;


/** 开始   必须调用此方法 否则无视图  设置完各参数最后调用生效*/
- (void)showStart;
复制代码

使用说明

将ASRotationPageView文件夹导入到工程中,并引入头文件#import "ASRotationPageView.h"

    self.rotaView = [[ASRotationPageView alloc] initWithFrame:self.view.bounds images:@[@"png1", @"png2", @"png3"]];
    self.rotaView.scrollDirection = ASRotationScrollDirectionHorizontal;
    self.rotaView.infiniteSliding = NO;
    self.rotaView.autoSliding = YES;
    self.rotaView.ScrollDidEnd = ^(NSUInteger currentPage) {
        weakself.pageView.currentPage = currentPage;
    };
    self.rotaView.SelectView = ^(UIView *view) {};
    [self.rotaView showStart];
    [self.view addSubview:self.rotaView];
复制代码

##下载地址 ASRotationPageView地址:https://github.com/meetly/ASRotationPageView

建议配合ASPageView使用(可自定义的pageViewController)

ASPageView地址:https://github.com/meetly/ASPageView

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值