Latest 0.4.0
License MIT
Platforms ios 9.0, requires ARC
Dependencies Kingfisher

WPFBannerView is simple Swift library for adding banner in your project. This project dependent on some popular libraries. They include iCarousel(OC library) Kingfisher etc.


  • iOS 9.0+
  • Swift 4.0+

How To Use

The library provides two static convenient method to init your banner.

let banner = WPFBannerView.bannerView(frame: CGRect(), imageURLS: [urls], titles: [titles]?, placeholder: nil?, didSelect: { (bannerView, index) in
    // To do something
}, didScroll: {  (bannerView, index) in
    // or nil
banner.pageControlDotColor =
banner.pageControlDotCurrentColor =


let banner = WPFBannerView.bannerView(frame: CGRect(x: 10, y: 50, width: 320, height: 134), imageURLS: remoteImageURLS, titles: [], placeholder: nil, delegate: self)
banner.type = .coverFlow
func bannerView(_ bannerView: WPFBannerView, didScrollItemTo index: Int) {}
func bannerView(_ bannerView: WPFBannerView, didSelectItemAt index: Int) {}


There are two way to use WPFBannerView in your project, or directly drag the WPFBannerView file into your project:

  • using CocoaPods
  • using Carthage

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the Get Started section for more details.


target 'target’ do
    pod 'WPFBannerView'

Installation with Carthage (iOS 8+)

Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods.

To install with carthage, follow the instruction on Carthage

carthage needs the support of kingfisher


github "codewpf/WPFBannerView"
github "Kingfisher"

Import headers in your source files

In the source files where you need to use the library, import the header file:

import WPFBannerView


Follow and contact me on Twitter or [Sina Weibo]( ). If you find an issue, just open a ticket. Pull requests are warmly welcome as well.


WPFBannerView is released under the MIT license. See LICENSE for details.

Latest podspec

    "name": "WPFBannerView",
    "version": "0.4.0",
    "summary": "A convenient way to init BannerView",
    "license": "MIT",
    "homepage": "",
    "authors": {
        "alex": "[email protected]"
    "platforms": {
        "ios": "9.0"
    "source": {
        "git": "",
        "tag": "0.4.0"
    "source_files": [
    "requires_arc": true,
    "dependencies": {
        "Kingfisher": [
            "~> 4.0"

Pin It on Pinterest

Share This