Latest 0.1.0
Homepage https://github.com/nakaji-dayo/OmniCarouselView
License MIT
Platforms ios 8.0, requires ARC
Dependencies AlamofireImage
Authors

Carousel view that can contain UIImage, image url or any view

CI Status
Version
License
Platform

demo movie

Usage

  1. import OmniCarouselView
  2. Putting a UIView in InterfaceBuilder, then set Custom Class to OmniCarouselView
  3. Please see following examples

Examples

Show UIImage

let images = [UIImage(named: "beer1"), UIImage(named: "beer2"), UIImage(named: "beer3")]
carouselView1.contents = images
  .filter({$0 != nil})
  .map({OmniCarouselView.Content.Image($0!)})

Show Image from url

let imageUrls = Array(1...3).map({i in NSURL(string: "https://raw.githubusercontent.com/nakaji-dayo/OmniCarouselView/master/Example/OmniCarouselView/Images.xcassets/beer(i).imageset/beer(i).jpeg")})
carouselView2.contents = imageUrls.filter({$0 != nil}).map({OmniCarouselView.Content.ImageUrl($0!)})

Show other UIView

let labels = Array(0..<3).map { (i) -> UILabel in
    let label = UILabel()
    label.text = "label:(i)"
    return label
}
carouselView3.contents = labels.map({OmniCarouselView.Content.View($0)})

Installation

OmniCarouselView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "OmniCarouselView"

Customize

key type description
infinite Bool use infinite loop paging(scrolling)
pager Bool show pager indicator

Author

nakaji-dayo, [email protected]

License

OmniCarouselView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "OmniCarouselView",
    "version": "0.1.0",
    "summary": "Carousel view that can contain UIImage, image url or any view",
    "description": "OmniCarouselView is a simple carousel(slide show) view in Swift.nneach pages(slides) can contain following items to easyn- UIImagen- NSURL of imagen- other any UIViewnnIt can customizen- use infinite loop paging(scrolling)n- show pager indicator",
    "homepage": "https://github.com/nakaji-dayo/OmniCarouselView",
    "license": "MIT",
    "authors": {
        "nakaji-dayo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nakaji-dayo/OmniCarouselView.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/nakaji_dayo",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "OmniCarouselView": [
            "Pod/Assets/*.png"
        ]
    },
    "dependencies": {
        "AlamofireImage": [
            "~> 2.0"
        ]
    }
}

Pin It on Pinterest

Share This