Latest 1.0.5
Homepage https://github.com/MillmanY/MMBannerLayout
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Demo

demo

Setting

demo

Use Banner

    if let layout = collection.collectionViewLayout as? MMBanerLayout {
        // Space every Item
        layout.itemSpace = 5.0
        // Size for banner cell
        layout.itemSize = self.collection.frame.insetBy(dx: 40, dy: 40).size
        // scroll to inifite (ex. completed block check your content size is enough to cycle infinite)
       (collection.collectionViewLayout as? MMBanerLayout)?.setInfinite(isInfinite: true, completed: { [unowned self]                    (result) in
            // result false mean you cant infinite
       })
        // auto play
        (collection.collectionViewLayout as? MMBanerLayout)?.autoPlayStatus = .play(duration: 2.0)
        // angle need to be (0~90)
        layout.angle = 45
    }

Use BannerLayoutDelegate

    //(Just setting self.collectionView.delegate = [your target])
    extension [your Target]: BannerLayoutDelegate {
             // Current IndexPath on center
            func collectionView(_ collectionView: UICollectionView, focusAt indexPath: IndexPath) {
                 print("Focus on (indexPath)")
            }
    }

Installation

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

(if you cant find pod command "pod repo update")
pod "MMBannerLayout"

Author

[email protected]

License

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

Latest podspec

{
    "name": "MMBannerLayout",
    "version": "1.0.5",
    "summary": "Custom Banner Layout",
    "description": "Custom Banner with 1.margin 2.Infinite 3.autoPlay 4.angle",
    "homepage": "https://github.com/MillmanY/MMBannerLayout",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MillmanY/MMBannerLayout.git",
        "tag": "1.0.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MMBannerLayout/Classes/**/*",
    "pushed_with_swift_version": "3.0-GM-CANDIDATE"
}

Pin It on Pinterest

Share This