MusicViewController
class MusicViewController : UIViewController, UICollisionBehaviorDelegate
Music View Controller
DUPLICATED
means this also appears on the Sound View Controller
-
Declare db to load options
DUPLICATED
Declaration
Swift
let dbInterface: <<error type>>
-
DUPLICATED
Declaration
Swift
let sensorManager: <<error type>>
-
DUPLICATED
Declaration
Swift
@IBOutlet weak var menuButton: UIBarButtonItem!
-
DUPLICATED
Progress barDeclaration
Swift
@IBOutlet weak var stackViewBar: UIStackView!
-
DUPLICATED
//Over the rangeDeclaration
Swift
@IBOutlet weak var progressBarOverflowUI: UIProgressView!
-
DUPLICATED
//Under the rangeDeclaration
Swift
@IBOutlet weak var progressBarUnderflow: UIProgressView!
-
DUPLICATED
Calculate how full each progress bar should be: The progress bars are: The one that shows how far under the range they are The one that shows where in the range The one that shows how far over the range they areDeclaration
Swift
@objc func updateProgress(notification: NSNotification)
Parameters
notification
contains the current progress
-
DUPLICATED
Calculate the size of each progress bar on the screen: The progress bars are: The one that shows how far under the range they are The one that shows where in the range The one that shows how far over the range they areDeclaration
Swift
func updateProgressView()
-
For Beacons
DUPLICATED
Declaration
Swift
let locationManager: CLLocationManager
-
Declare variables that are loaded from profile
DUPLICATED
Declaration
Swift
var selectedProfile: String
-
DUPLICATED
Load a user profile into global memory using the globalselectedProfile
Declaration
Swift
func loadProfile()
-
DUPLICATED
Allow the user to update the sweep range on the fly Will update the view of the progress barsDeclaration
Swift
@IBAction func sweepRangeSlider(_ sender: UISlider)
-
This is a function that gets activated whenever the start/stop button is pressed It will give feedback when it is looking for a connection and when it found one It should connect and init the audio player when started It should stop the audio and disconnect when stopped
Declaration
Swift
@IBAction func controlButton(_ sender: Any)
-
When the sview is loaded function will (in order) 1.Call the super view
- Create the side menu
- Choose which user profile is being used via default settings
- Load the profile preference
- Dynamically change the progress bars according to preferences
- Register functions for calls from other files (create observers)
- Handle Beacon stuff
Declaration
Swift
override func viewDidLoad()
-
For Beacons
DUPLICATED
Declaration
Swift
func addViewController(atOffset offset: CGFloat, dataForVC data: AnyObject?) -> UIView?
-
For Beacons
DUPLICATED
Declaration
Swift
@objc func handlePan(gestureRecognizer: UIPanGestureRecognizer)
-
For Beacons
DUPLICATED
Declaration
Swift
func pin(view: UIView)
-
For Beacons
DUPLICATED
Declaration
Swift
func setVisibility(view: UIView, alpha: CGFloat)
-
For Beacons
DUPLICATED
Declaration
Swift
func addVelocity(toView view: UIView, fromGestureRecognizer panGesture: UIPanGestureRecognizer)
-
For Beacons
DUPLICATED
Declaration
Swift
func itemBehavior(forView view: UIView) -> UIDynamicItemBehavior?
-
For Beacons
DUPLICATED
Declaration
Swift
func collisionBehavior(_ behavior: UICollisionBehavior, endedContactFor item: UIDynamicItem, withBoundaryIdentifier identifier: NSCopying?)
-
This function is called when the user switched cane movement directions. If the sweep is long enough it will start or continue the music, otherwise it will stop the music Parameter notification: Passed in container that has the length of the sweep
Declaration
Swift
@objc func processSweeps(notification: NSNotification)
-
Stops music from playing if necessary
Declaration
Swift
@objc func stopPlaying()
-
Honestly have no idea what’s going on here
Declaration
Swift
func centralManagerDidUpdateState(_ central: CBCentralManager)