Latest 0.0.2
Homepage https://github.com/apploft/AdaptiveSidebarViewController
License MIT
Platforms ios 8.0, requires ARC

AdaptiveSidebarViewController is a simple container which can adaptively display a viewcontroller in a sidebar (regular environment) or pushed on the navigation stack (compact environment).

 

Installation

Install via cocoapods by adding this to your Podfile:

pod "AdaptiveSidebarViewController"

Usage

Make a subclass of AdaptiveSidebarViewController and specify the main/side viewcontrollers:

override func viewDidLoad() {
    let mainVC = storyboard.instantiateViewControllerWithIdentifier("mainVC")
    mainViewController = mainVC

    let detailVC : storyboard.instantiateViewControllerWithIdentifier("detailVC")
    sideViewController = detailVC

    super.viewDidLoad()
}

In order to show/hide the sidebar, you use:

func showSideView(animated: Bool) -> Void
func hideSideView(animated: Bool) -> Void

Apart from that, one can modify the sidebar width:

sideViewWidth = 320

License

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

Latest podspec

{
    "name": "AdaptiveSidebarViewController",
    "version": "0.0.2",
    "summary": "A simple a simple container which can adaptively display a viewcontroller in a sidebar.",
    "description": "AdaptiveSidebarViewController is a simple container which can adaptively display anviewcontroller in a sidebar (regular environment) or pushed on thennavigation stack (compact environment).",
    "homepage": "https://github.com/apploft/AdaptiveSidebarViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Mathias Ku00f6hnke",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/apploft/AdaptiveSidebarViewController.git",
        "tag": "0.0.2"
    },
    "source_files": [
        "Classes",
        "Classes/**/*.{swift}"
    ],
    "exclude_files": "Classes/Exclude",
    "requires_arc": true
}

Pin It on Pinterest

Share This