codecaffeine / CardStackController

A demo of using Container UIViewControllers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Card Stack View Controller

About

An example UIViewController container that allows you to view multilpe viewControllers at once by minimizing them all. You can move these minimized views around and swipe them off-screen to remove them. You can also tap on a minimized viewController to bring it to focus.

Requirements

I've only tested this with Xcode 4.2+ so I don't know if it'll work < 4.2.

API

CAFCardStackController - the container view controller to display other view controllers in WebOS fasion

  • Methods

    • (void)addCardViewController:(UIViewController *)viewController
      • viewController
        • If nil, otherwise noop.
        • Assumes full screen display.
        • When method completes, added to cardViewControllers array
    • (void)focusCardViewController:(UIViewController *)viewController
      • viewController
        • Must already be in cardViewControllers array, otherwise noop
    • (void)showAllCardViewControllers
      • Shows card selector screen
    • (void)removeCardViewController:(UIViewController *)viewController
      • viewController
        • Must already be in cardViewControllers array, otherwise noop
        • When method completes, removed from cardViewControllers array
  • Properties

    • NSArray *cardViewControllers

Updates

  • 2/11/2012: Fixed an issue where the app would crash when built with Xcode 4.2.
  • 5/20/2012: Fixed a memry leak when on removing a viewControler

About

A demo of using Container UIViewControllers

License:MIT License


Languages

Language:Objective-C 100.0%