<file_sep>//
//  MapViewController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/29/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation


class MapViewController: UIViewController {
    
    @IBAction func backButton(sender: AnyObject) {
        let vc : AnyObject! = self.storyboard?.instantiateViewControllerWithIdentifier("activityView")
        self.showViewController(vc as! UIViewController, sender: vc)

    }
}<file_sep>//
//  HealthTipController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/29/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import UIKit


class HealthTipController: UIViewController, PlayerDelegate {
    
    let videoUrl = NSURL(string: "https://v.cdn.vine.co/r/videos/AA3C120C521177175800441692160_38f2cbd1ffb.1.5.13763579289575020226.mp4")!
     private var player: Player!

    @IBOutlet weak var menuButton: UIBarButtonItem!
    
    override func viewDidLoad() {
        
        if self.revealViewController() != nil {
            menuButton.target = self.revealViewController()
            menuButton.action = "revealToggle:"
            self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
        }
        
        
        self.view.autoresizingMask = ([UIViewAutoresizing.FlexibleWidth, UIViewAutoresizing.FlexibleHeight])
        
        self.player = Player()
        self.player.delegate = self
        self.player.view.frame = self.view.bounds
        
        self.addChildViewController(self.player)
        self.view.addSubview(self.player.view)
        self.player.didMoveToParentViewController(self)
        
        self.player.setUrl(videoUrl)
        
        self.player.playbackLoops = true
        
        let tapGestureRecognizer: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "handleTapGestureRecognizer:")
        tapGestureRecognizer.numberOfTapsRequired = 1
        self.player.view.addGestureRecognizer(tapGestureRecognizer)
    }
    
    override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)
        
        self.player.playFromBeginning()
    }
    
    // MARK: UIGestureRecognizer
    
    func handleTapGestureRecognizer(gestureRecognizer: UITapGestureRecognizer) {
        switch (self.player.playbackState.rawValue) {
        case PlaybackState.Stopped.rawValue:
            self.player.playFromBeginning()
        case PlaybackState.Paused.rawValue:
            self.player.playFromCurrentTime()
        case PlaybackState.Playing.rawValue:
            self.player.pause()
        case PlaybackState.Failed.rawValue:
            self.player.pause()
        default:
            self.player.pause()
        }
    }

    
    func playerReady(player: Player) {
    }
    
    func playerPlaybackStateDidChange(player: Player) {
    }
    
    func playerBufferingStateDidChange(player: Player) {
    }
    
    func playerPlaybackWillStartFromBeginning(player: Player) {
    }
    
    func playerPlaybackDidEnd(player: Player) {
    }
}<file_sep>//
//  SharingViewController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/18/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import UIKit

class SharingViewController: UITableViewController {
    
    @IBOutlet weak var menuButton: UIBarButtonItem!
    
    
  
    @IBAction func backButton(sender: AnyObject) {
        
        let vc : AnyObject! = self.storyboard?.instantiateViewControllerWithIdentifier("welcomeCenter")
        self.showViewController(vc as! UIViewController, sender: vc)
    }
    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return 1
    }
    
     override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 4
    }
    
    
     override func tableView(tableView: UITableView, editingStyleForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCellEditingStyle {
        return .None
    }
    
     override func tableView(tableView: UITableView, shouldIndentWhileEditingRowAtIndexPath indexPath: NSIndexPath) -> Bool {
        return false
    }
    
    
    @IBAction func postButton(sender: AnyObject) {
        
        let vc : AnyObject! = self.storyboard?.instantiateViewControllerWithIdentifier("shareView")
        self.showViewController(vc as! UIViewController, sender: vc)
    }

    
    override func viewDidLoad() {
        super.viewDidLoad()

        if self.revealViewController() != nil {
            menuButton.target = self.revealViewController()
            menuButton.action = "revealToggle:"
            self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
        }
        
        
    }
    
  }
<file_sep>//
//  DetailViewController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/29/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
<file_sep>//
//  PostViewController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/29/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import UIKit

class PostViewController: UIViewController {
    
    override func viewDidLoad() {
        
    }
    
    @IBAction func backButton(sender: AnyObject) {
        
        let vc : AnyObject! = self.storyboard?.instantiateViewControllerWithIdentifier("healthView")
        self.showViewController(vc as! UIViewController, sender: vc)
        
    }
    
    @IBAction func shareButton(sender: AnyObject) {
        
        let vc : AnyObject! = self.storyboard?.instantiateViewControllerWithIdentifier("healthView")
        self.showViewController(vc as! UIViewController, sender: vc)
    }
   
}<file_sep>//
//  ProfileViewController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/18/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import UIKit

class ProfileViewController: UIViewController {
    @IBOutlet weak var menuButton: UIBarButtonItem!
    
    override func viewDidLoad() {
        
        if self.revealViewController() != nil {
            menuButton.target = self.revealViewController()
            menuButton.action = "revealToggle:"
            self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
        }
       
    }
    
    @IBAction func updateButton() {
        alert()
    }
    
    @IBAction func alert() {
        let alertController = UIAlertController(title: "Profile updated", message: "Profile has been updated", preferredStyle: .Alert)
        let defaultAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default)
            { action -> Void in
                // Put your code here
                //changes view programatically
                
                
        }
        alertController.addAction(defaultAction)
        presentViewController(alertController, animated: true, completion: nil)

    }
}
<file_sep>//
//  SharingViewController.swift
//  HealthMark v1.0
//
//  Created by <NAME> on 1/18/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import UIKit

class SharingViewController: UIViewController {
    
    @IBOutlet weak var menuButton: UIBarButtonItem!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        if self.revealViewController() != nil {
            menuButton.target = self.revealViewController()
            menuButton.action = "revealToggle:"
            self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
        }
    }
}
