Latest 0.5
Homepage https://github.com/movielala/TVOSSlideViewController
License MIT
Platforms tvos 9.0, requires ARC
Authors

Container view controller with left and right drawer controlling by pan gesture for tvOS.
inspired by the zova tvos app.

Features

  • Optional left and/or right drawers.
  • Customisable slide range.
  • Customisable trashold for select state.
  • Customisable shadow.
  • Storyboard support.
  • Autolayout support.
  • Setup trough the code without storyboard.
  • Shrinks content
  • Parallax

Demo

shrinks = false

alt tag

shrinks = true

alt tag

parallax = true

alt tag

Install

CocoaPods

pod 'TVOSSlideViewController'

Usage

Storyboard

  • You need to subclass TVOSSlideViewController and set your view controller instantce’s class to your subclass in IB.
  • Customise TVOSSlideViewControllers @IBInspectable properties in interface builder without touching code
  • call setup(contentViewController:) function in your subclass for setup content view.
  • You can inject whatever you want as content.

Code

Different from storyboard implementation, you can initilze TVOSSlideViewController directly with:

public init(contentViewController: UIViewController, leftView: UIView?, rightView: UIView?)

TVOSSlideViewControllerDelegate

  • This is the control protocol of TVOSSlideViewConroller.
  • Events like didSelect, didUpdate, didCancel could be handled by implementing this delegate.
  • amount: CGFlaot returns the drawers visibility range between 0-1 for easier drawer animation implementation.
@objc public protocol TVOSSlideViewControllerDelegate {
  optional func slideViewControllerDidBeginUpdateLeftDrawer(slideViewController: TVOSSlideViewController)
  optional func slideViewControllerDidBeginUpdateRightDrawer(slideViewController: TVOSSlideViewController)
  optional func slideViewControllerDidUpdateLeftDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)
  optional func slideViewControllerDidUpdateRightDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)
  optional func slideViewControllerDidEndUpdateLeftDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)
  optional func slideViewControllerDidEndUpdateRightDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)
  optional func slideViewControllerDidSelectLeftDrawer(slideViewController: TVOSSlideViewController)
  optional func slideViewControllerDidSelectRightDrawer(slideViewController: TVOSSlideViewController)
}

TVOSSlideViewControllerShadow

  • Set it up in interface builder with draggin and dropping object template to your TVOSSlideViewController instance.
  • Since TVOSSlideViewControllerShadow is a @IBDesignable object, you can set it properties directly from storyboard
  • Programmatically you can set shadow property values.

Authors

Other tvOS projects

Latest podspec

{
    "name": "TVOSSlideViewController",
    "version": "0.5",
    "summary": "Container view controller with left and right drawer controlling by pan gesture for tvOS.",
    "description": "TVOSSlideViewControllern===nnContainer view controller with left and right drawer controlling by pan gesture for tvOS.ninspired by the [zova](http://get.zova.com/) tvos app.nnFeaturesn----nn* Optional left and/or right drawers.n* Customisable slide range.n* Customisable trashold for select state.n* Storyboard support.n* Autolayout support.n* Setup trough the code without storyboard.n* Shrinks contentnnDemon----nn#### `shrinks = false`nn![alt tag](https://raw.githubusercontent.com/movielala/TVOSSlideViewController/master/demo.gif)nn#### `shrinks = true`nn![alt tag](https://raw.githubusercontent.com/movielala/TVOSSlideViewController/master/shrink.gif)nnInstalln----nn#### CocoaPodsnn``` rubynpod 'TVOSSlideViewController'n```nnUsagen----nn#### Storyboardnn* You need to subclass `TVOSSlideViewController` and set your view controller instantce's class to your subclass in IB.n* Customise `TVOSSlideViewController`s `@IBInspectable` properties in interface builder without touching coden* call `setup(contentViewController:)` function in your subclass for setup content view.n* You can inject whatever you want as content.nn#### CodennDifferent from storyboard implementation, you can initilze `TVOSSlideViewController` directly with:nn``` swiftnpublic init(contentViewController: UIViewController, leftView: UIView?, rightView: UIView?)n```nnTVOSSlideViewControllerDelegaten----nn* This is the control protocol of `TVOSSlideViewConroller`.n* Events like didSelect, didUpdate, didCancel could be handled by implementing this delegate.n* `amount: CGFlaot` returns the drawers visibility range between 0-1 for easier drawer animation implementation.nn``` [email protected] public protocol TVOSSlideViewControllerDelegate {noptional func slideViewControllerDidBeginUpdateLeftDrawer(slideViewController: TVOSSlideViewController)noptional func slideViewControllerDidBeginUpdateRightDrawer(slideViewController: TVOSSlideViewController)noptional func slideViewControllerDidUpdateLeftDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)noptional func slideViewControllerDidUpdateRightDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)noptional func slideViewControllerDidEndUpdateLeftDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)noptional func slideViewControllerDidEndUpdateRightDrawer(slideViewController: TVOSSlideViewController, amount: CGFloat)noptional func slideViewControllerDidSelectLeftDrawer(slideViewController: TVOSSlideViewController)noptional func slideViewControllerDidSelectRightDrawer(slideViewController: TVOSSlideViewController)n}n```",
    "homepage": "https://github.com/movielala/TVOSSlideViewController",
    "license": "MIT",
    "authors": {
        "cemolcay": "[email protected]"
    },
    "platforms": {
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/movielala/TVOSSlideViewController.git",
        "tag": "v0.5"
    },
    "source_files": "TVOSSlideViewController/TVOSSlideViewController",
    "requires_arc": true
}

Pin It on Pinterest

Share This