WPFBannerView 0.4.0

WPFBannerView 0.4.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2018

Maintained by *alex*.


Downloads

Total17
Week0
Month0

Installs

Apps2
powered by Segment

GitHub

Stars0
Watchers0
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files14
LOCLines of Code 3,130


  • By
  • alex

WPFBannerView

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. 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.