-
Notifications
You must be signed in to change notification settings - Fork 1
/
MicrojamTutorialTestingScreenController.swift
46 lines (38 loc) · 1.58 KB
/
MicrojamTutorialTestingScreenController.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// MicrojamTutorialTestingScreenController.swift
// microjam
//
// Created by Charles Martin on 30/3/18.
// Copyright © 2018 Charles Martin. All rights reserved.
//
import UIKit
class MicrojamTutorialTestingScreenController: UIViewController {
@IBOutlet weak var chirpViewContainer: UIView!
var recorder: ChirpRecorder?
override func viewDidLoad() {
super.viewDidLoad()
// configuration for the chirpViewContainer
// Loaded with a new recorder. (i.e., in the jam tab)
recorder = ChirpRecorder(frame: chirpViewContainer.bounds)
recorder?.recordingView = ChirpRecordingView(frame: chirpViewContainer.bounds)
if let recView = recorder?.recordingView {
chirpViewContainer.addSubview(recView)
recView.recordingColour = UIColor.blue.cgColor
}
chirpViewContainer.layer.cornerRadius = 8
chirpViewContainer.layer.borderWidth = 1
chirpViewContainer.layer.borderColor = UIColor(white: 0.8, alpha: 1).cgColor
chirpViewContainer.clipsToBounds = true
chirpViewContainer.contentMode = .scaleAspectFill
chirpViewContainer.backgroundColor = UIColor.red.darkerColor
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func skipTutorial(_ sender: Any) {
self.dismiss(animated: false, completion: nil)
UserDefaults.standard.set(true, forKey: SettingsKeys.tutorialCompleted)
}
}