Giter Club home page Giter Club logo

advertisingslider's Introduction

AdvertisingSlider

AdvertisingSlider

It's simple way to show some images with text in yours iOS appication

Swift 5.0; >=iOS10.3

Installation:

pod 'AdvertisingSlider', '0.9.6'

How to use:

Just put UIView in your xib or storyboard and change class name on "AdvertisingSlider"

Follow AdvertisingSliderDataSource to fill view:

It has 3 methods:

func pagesCount(forSlider: AdvertisingSlider) -> Int

func imageForIndex(_ index: Int, slider: AdvertisingSlider) -> UIImage

func textForIndex(_ index: Int, slider: AdvertisingSlider) -> String

For reloading view and changing pages:

For reload view use func reloadData()

Functions nextPage() and previousPage() are switching pages, if you'll want to make it with other component

If you want to go some any page you can use func moveToPage(_ index: Int, animated: Bool)

Customise:

This component can used with 2 ways: for showing only images (by swipe) or showing images and text (by buttons)

For choosing first one - swith property scrollingManually to true. It false by default.

Use next properties for change UI:

When "scrollingManually == false" AdvertisingSlider has UIView over images. You can change color and alpha channel for it. To do this use: 'overViewColor', 'overViewAlpha'

For customise PageControl:

activePageColor == currentPageIndicatorTintColor

pageColor == pageIndicatorTintColor

Set 'pageControlInteraction = true' if you want to change current page by tap on page control. It false by default

For change text settings:

textColor

font

textRows == numberOfLines (UILabel)

Use 'defaultText' when you want to show some message while no data. It doesn't work when 'scrollingManually == true'

For change buttons images use leftButtonImage / rightButtonImage properties

For change imageViews content mode use 'contentMode' property of AdvertisingSlider

Most of properties are @IBInspectable

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.