Latest 1.4
Homepage https://github.com/v-braun/VBPiledView
License MIT
Platforms ios 10.0
Authors

simple but highly effective animation and interactivity!

By v-braun – viktor-braun.de.

CocoaPods

Preview

image

Description

Very simple and beautiful stacked UIView to use as a replacement for an UITableView, UIImageView or as a menu.

Inspired by this post from ULTRALINX:

image

Installation

CocoaPods

VBPiledView is available on CocoaPods. Just add the following to your project Podfile:

pod 'VBPiledView', '~> 1.4'

Or from GitHub:

pod 'VBPiledView', :git => 'https://github.com/v-braun/VBPiledView.git'

Manually

  1. Download and drop VBPiledView.swift in your project.
  2. Congratulations!

Usage

See the Example Project.

Here is a sample ViewController that use the VBPiledView:

import VBPiledView
class ViewController: UIViewController, VBPiledViewDataSource {

    @IBOutlet var piledView: VBPiledView!

    private var _subViews = [UIView]()

    override func viewDidLoad() {
        super.viewDidLoad()

        _subViews.append(UIImageView(image: UIImage(named: "ant.jpg")))
        _subViews.append(UIImageView(image: UIImage(named: "bigban.jpg")))
        _subViews.append(UIImageView(image: UIImage(named: "leopard.jpg")))
        _subViews.append(UIImageView(image: UIImage(named: "libertystate.jpg")))
        _subViews.append(UIImageView(image: UIImage(named: "Moonrise.jpg")))
        _subViews.append(UIImageView(image: UIImage(named: "photographer.jpg")))

        for v in _subViews{
            v.contentMode = UIViewContentMode.ScaleAspectFill
            v.clipsToBounds = true
            v.backgroundColor = UIColor.grayColor()
        }

        piledView.dataSource = self
    }

    func piledView(numberOfItemsForPiledView: VBPiledView) -> Int {
        return _subViews.count
    }

    func piledView(viewForPiledView: VBPiledView, itemAtIndex index: Int) -> UIView {
        return _subViews[index]
    }
}

Configuration

The sizes of an expanded item and of all collapsed items can be configured relative to the size of the VBPiledView.


self.piledView.expandedContentHeightInPercent = 70 // expanded content height -> 70% of screen
self.piledView.collapsedContentHeightInPercent = 15 // collapsed content heigt of single item -> 15% of screen

Known Issues

If you discover any bugs, feel free to create an issue on GitHub fork and
send me a pull request.

Issues List.

Authors

image
v-braun

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

See LICENSE.

Latest podspec

{
    "name": "VBPiledView",
    "version": "1.4",
    "summary": "Simple and beautiful stacked UIView to use as a replacement for an UITableView, UIImageView or as a menu.",
    "description": "Inspired by [this](http://theultralinx.com/2015/10/inspirational-ui-design-15/) post from [ULTRALINX](http://theultralinx.com/)nn![image](http://a4.files.theultralinx.com/image/upload/MTMzNjc1NDE5MTIyNTQzMjM1.gif)",
    "homepage": "https://github.com/v-braun/VBPiledView",
    "screenshots": "https://github.com/v-braun/VBPiledView/blob/master/screen.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Viktor Braun (v_b)": "[email protected]"
    },
    "social_media_url": "https://twitter.com/v_braun",
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/v-braun/VBPiledView.git",
        "tag": "1.4"
    },
    "source_files": "VBPiledView/VBPiledView/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This