Skip to content

Instantly share code, notes, and snippets.

@Drenerdo
Created March 18, 2016 04:20
Show Gist options
  • Save Drenerdo/b75f1c0c733c8d79c99f to your computer and use it in GitHub Desktop.
Save Drenerdo/b75f1c0c733c8d79c99f to your computer and use it in GitHub Desktop.
CarbonKit Issue fix
import UIKit
import CarbonKit
class PhotoMenuViewController: UIViewController, CarbonTabSwipeNavigationDelegate {
override func viewDidLoad() {
super.viewDidLoad()
super.viewDidLoad()
let items = ["Photos", "Videos", "Music"]
let carbonTabSwipeNavigation = CarbonTabSwipeNavigation(items: items, delegate: self)
carbonTabSwipeNavigation.insertIntoRootViewController(self)
// Do any additional setup after loading the view.
}
func carbonTabSwipeNavigation(carbonTabSwipeNavigation: CarbonTabSwipeNavigation, viewControllerAtIndex index: UInt) -> UIViewController {
// return viewController at index
switch (index) {
case 0:
return storyboard!.instantiateViewControllerWithIdentifier("signInVC")
case 1:
return storyboard!.instantiateViewControllerWithIdentifier("createAccVC")
default:
return self
}
}
// override func didReceiveMemoryWarning() {
// super.didReceiveMemoryWarning()
// // Dispose of any resources that can be recreated.
// }
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment