Git Product home page Git Product logo

rnimageviewplayer's Introduction

RNImageViewPlayer

一个小巧精致的无限轮播(支持自定义)

效果图

  • 默认效果:

默认

  • 自定义效果:

自定义

How to use

代码添加RNImageViewPlayer或者在storyBoard/xib中继承RNImageViewPlayer,并设置代理

可配置项

  • scrollInterval: 自动滑动的时间间隔,默认为2.5s
  • isHidePageControl: 是否隐藏pageController,默认不隐藏
  • isAutomaticScroll: 是否自动滑动,默认为true
  • isEndlessScroll: 是否无限轮播,默认为true
  • pageControlPosition: pageController位置,详见PageControlPosition枚举
  • currentPgaeIndex: 显示的位置,默认为0显示第一个

Delegate

// 数据源大小,images count
func imagePlayerNumberOfItems(imagePlayer: RNImageViewPlayer) -> Int
// 返回自定义的cell,需要提前进行注册
@objc optional func imagePlayer(imagePlayer: RNImageViewPlayer, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
// 将要展示默认样式(默认cell)的imageView,在这里可以对imageView进行一些操作如设置image
@objc optional func imagePlayer(imagePlayer: RNImageViewPlayer, willLoadDefaultCellImageWith imageView: UIImageView, at index: Int)
// 已经滑动到某个item
@objc optional func imagePlayer(imagePlayer: RNImageViewPlayer, didScrollAt index: Int)
// 选中某个Item
@objc optional func imagePlayer(imagePlayer: RNImageViewPlayer, didSelectItemAt index: Int)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.