Latest 1.2.0
Homepage https://github.com/jamesdouble/JDynamicBannerView
License MIT
Platforms ios 8.0
Authors

JDynamicBannerView 是一個仿京東首頁做的一個廣告橫幅Banner控件

JDynamicBannerView is a banner view component inspired by 京東

Alt text
Alt text
Alt text
Alt text

Demo

Installation

  • Cocoapods
    pod 'JDynamicBannerView'

Usage

Init

let banner = DynamicCycleScrollView(frame: CGRect(origin: CGPoint(x: 20, y: 100), size: CGSize(width: 340, height: 100)))

SetView

banner.setView(viewCount: 2) { (index) -> UIView in
    let text = "test(index+1)"
    let img = UIImage(named: text)
    let imgView = UIImageView(image: img)
    return imgView
}

ClickBlock

banner.clickBlock = { (idx) in
    print(idx)
}   

Parameter

Banner Size (Black Line is frame) :

  1. Mutiple Data

JDynamicBannerView

  1. Single

JDynamicBannerView

  1. other
public var autoScrollInterval: TimeInterval = 5.0

public var autoScrolling: Bool = true

public var infinityScrolling: Bool = true

public var minimumScale: CGFloat = 0.85

Latest podspec

{
    "name": "JDynamicBannerView",
    "version": "1.2.0",
    "summary": "A banner view component inspired by u4eacu6771",
    "description": "JDynamicBannerView is a banner view component inspired by u4eacu6771",
    "homepage": "https://github.com/jamesdouble/JDynamicBannerView",
    "license": "MIT",
    "authors": {
        "JamesKuo": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/jamesdouble/JDynamicBannerView.git",
        "tag": "1.2.0"
    },
    "source_files": "JDynamicBannerView/DynamicBannerView.swift"
}

Pin It on Pinterest

Share This