 import UIKit
 import EventKit
 import EventKitUI
+import Timepiece
 
 class MainViewController: UIViewController, EKCalendarChooserDelegate {
 


    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        if let navCtrl = self.navigationController {
            let bgImage = UIImage(named: "background")
            navCtrl.navigationBar.setBackgroundImage(bgImage, forBarMetrics: UIBarMetrics.Default)
        }
        setNavbarTitle()
    }

    override func viewDidAppear(animated: Bool) {

        let navigationController = UINavigationController(rootViewController: self.calendarChooser)
        self.presentViewController(navigationController, animated: true, completion: nil)
    }

    // MARK: EKCalendarChooserDelegate

    func calendarChooserSelectionDidChange(calendarChooser: EKCalendarChooser!) {
        var calendars: [EKCalendar] = []
