MainViewController

final class MainViewController : UIViewController
extension MainViewController: ControllerConfiguration

Top-level view controller for the application. It contains the Sampler which will emit sounds based on what keys are touched. It also starts the audio engine when the application becomes active, and stops it when the application goes to the background or stops being active.

  • Disable system gestures near screen edges so that touches on the keyboard are always seen by the application.

    Declaration

    Swift

    override var preferredScreenEdgesDeferringSystemGestures: UIRectEdge { get }
  • If true, do not show the tutorial pages for the first time the application starts. This is used by the UI tests.

    Declaration

    Swift

    var skipTutorial: Bool
  • Undocumented

    Declaration

    Swift

    override func viewDidLoad()
  • Undocumented

    Declaration

    Swift

    override func viewDidAppear(_ animated: Bool)
  • Undocumented

    Declaration

    Swift

    override func willTransition(
      to newCollection: UITraitCollection,
      with coordinator: UIViewControllerTransitionCoordinator
    )
  • Start audio processing. This is done as the app is brought into the foreground.

    Declaration

    Swift

    func startAudio()
  • Stop audio processing. This is done prior to the app moving into the background.

    Declaration

    Swift

    func stopAudio()

Controller Configuration

  • Establish connections with other managers / controllers.

    Declaration

    Swift

    func establishConnections(_ router: ComponentContainer)

    Parameters

    router

    the ComponentContainer that holds all of the registered managers / controllers