Latest 0.3.5
Homepage https://github.com/codewpf/WPFBannerView
License MIT
Platforms ios 9.0, requires ARC
Dependencies Kingfisher
Authors




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.

Requirements

  • iOS 9.0+
  • Swift 3.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 = UIColor.xxx
banner.pageControlDotCurrentColor = UIColor.xxx
self.view.addSubview(banner)

and

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

Installation

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.

Podfile

platform :ios, '9.0'
use_frameworks!

target 'target’ do
    pod 'WPFBAnnerView'
end

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

Cartfile

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

Contact

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

License

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

Latest podspec

{
    "name": "WPFBannerView",
    "version": "0.3.5",
    "summary": "A convenient way to init BannerView",
    "license": "MIT",
    "homepage": "https://github.com/codewpf/WPFBannerView",
    "authors": {
        "alex": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/codewpf/WPFBannerView.git",
        "tag": "0.3.5"
    },
    "source_files": [
        "WPFBannerView",
        "WPFBannerView/**/*.{h,m}",
        "WPFBannerView/**/*.{swift}",
        "WPFBannerView/*.{h}"
    ],
    "requires_arc": true,
    "dependencies": {
        "Kingfisher": [
            "~> 3.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This