Created
March 10, 2015 22:48
-
-
Save Jamonek/8999805d94f5f4f558c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Legend.swift | |
// VCN | |
// | |
// Created by Jamone Alexander Kelly on 3/3/15. | |
// Copyright (c) 2015 Veteran Care Network, LLC. All rights reserved. | |
// | |
import UIKit | |
class Legend : UIViewController { | |
@IBOutlet weak var containerView: UIView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// load default view into container | |
let view = UIStoryboard(name: "Main", bundle: nil) | |
let vc = view.instantiateViewControllerWithIdentifier("layersSub") as UIViewController | |
let sub = vc.view | |
containerView.addSubview(sub) | |
} | |
@IBAction func segmentChange(sender: UISegmentedControl) { | |
switch(sender.selectedSegmentIndex) | |
{ | |
case 0: | |
let view = UIStoryboard(name: "Main", bundle: nil) | |
let vc = view.instantiateViewControllerWithIdentifier("layersSub") as UIViewController | |
let sub = vc.view | |
containerView.addSubview(sub) | |
case 1: | |
let view = UIStoryboard(name: "Main", bundle: nil) | |
let vc = view.instantiateViewControllerWithIdentifier("legendSub") as UIViewController | |
let sub = vc.view | |
containerView.addSubview(sub) | |
default: | |
println("Test") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment