Latest 0.1.4
Homepage https://github.com/1er4y/IYSlideView
License MIT
Platforms ios 9.1
Frameworks UIKit, Foundation
Authors

[![CI Status](http://img.shields.io/travis/Ильнур Ягудин/IYSlideView.svg?style=flat)](https://travis-ci.org/Ильнур Ягудин/IYSlideView)
Version
License
Platform

What this pod can do?

IYSlideView IYSlideView IYSlideView

Example

To run the example project, clone the repo, and run pod install from the Example directory first.
In example project, you will see fife examples with different gestures.

Requirements

  • iOS 9.1 and higher
  • Swift 3
  • Xcode 8.0

Installation

Installation in 2 parts: Setup in Storyboard and Setup in Code

  1. Part – Setup in Storyboard:

    1.1. Open your Storyboard file, select your controller and drag&drop empty UIView. This view will be your slider view.

    IYSlideView

    1.2. If you want, drag&drop in your slider view Button. In this instruction, we will use Button.

    IYSlideView

    1.3. Select your created View and in Interface Builder, click on Identity Inspector tab and in fields Custom Class and Module type IYSlideView

    IYSlideView

    1.4. After that, add to your empty view constraints: Horizontal in container, Space from Top, and Width with Height

    IYSlideView

    1.5. Click on Connections Inspector tab, you will see three outlets: dragButtom, height, width. Connect them to constraints of slider view and button.

    IYSlideView

  2. Part – Setup in code:

    2.1. Open your View Controller class and add following line in imports

    import IYSlideView

    2.2. Now, you need implement IYSlideViewProtocols. For do that, add:

    class <nameOfYourVc>: UIViewController, IYSlideViewProtocols {
    ....
    }

    2.3. Then, you need implement minimum one required protocol method:

    func slideViewPresentViewController(_ containerView: UIView) {
    }

    2.4. Add following line in your View Controller to create Outlet with slider view and connect them from Storyboard.:

    @IBOutlet weak var sliderView: IYSlideView!

    2.5. In method viewDidLoad in your VC add this lines:

    sliderView.settings.dragDirection = .down //Drag direction is required
    sliderView.delegate = self //required

    2.6. Finally, add this lines in slideViewPresentViewController method (this method we implemented earlier):

    let controller = self.storyboard?.instantiateViewController(withIdentifier: "   <PresentingViewControllerStoryboardID>")
    self.addChildViewController(controller!)
    controller?.view.frame = containerView.bounds
    containerView.addSubview(controller!.view)
    self.didMove(toParentViewController: self)

    Note: Replace PresentingViewControllerStoryboardID with StoryboardID of View Controller that you want present in slider view.

Result

IYSlideView

Cocoa Pods

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

pod "IYSlideView"

Additional Info

For more examples, please clone repo Example and open in Xcode. You will see 5 different examples.

Author

Ilnur Yagudin, [email protected]

License

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

Latest podspec

{
    "name": "IYSlideView",
    "version": "0.1.4",
    "summary": "Expandable UIView with AutoLayout. Expanding from different positions and in different directions.",
    "description": "Subclass of UIViev class that allows the user to open and close the View with the gestures in different directions. Offers four directions gestures: from top to bottom, bottom to top, right to left, left to right. After opening at full size, shows your specified UIViewController as child in container (Just like Container View in Storyboard). Fully supports the Auto layout. Simple installation in 3 steps. Very nice and flexibly customizable animation of opening and closing.",
    "homepage": "https://github.com/1er4y/IYSlideView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ilnur Yagudin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/1er4y/IYSlideView.git",
        "tag": "0.1.4"
    },
    "social_media_url": "https://twitter.com/rem1x_69",
    "platforms": {
        "ios": "9.1"
    },
    "source_files": "IYSlideView/Classes/**/*",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This