-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewController.swift
69 lines (41 loc) · 1.69 KB
/
ViewController.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// ViewController.swift
// Honda_Hack_2019
//
// Created by James Boisvert on 1/18/19.
// Copyright © 2019 James Boisvert. All rights reserved.
//
import UIKit
import AVKit
import FirebaseDatabase
class ViewController: UIViewController {
@IBOutlet weak var Open_image: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
// let ref = Database.database().reference()
Open_image.image = UIImage(named: "Honda_logo")
self.apply_round(Open_image)
//self.apply_round(Driver_Mode)
//self.apply_round(Developer_Mode)
let value = UIInterfaceOrientation.landscapeLeft.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
self.Open_image.layer.cornerRadius = 100.0
// Do any additional setup after loading the view, typically from a nib.
}
@IBAction func Developer_mode(_ sender: Any) {
// if let path = Bundle.main.path(forResource: "Recfile P3 Edge 20181120 104743 Webcam Logitech Forward Outputiplimage", ofType: "m4v"){
//let video = AVPlayer(url: URL(fileURLWithPath: path))
// let videoPlayer = AVPlayerViewController()
// videoPlayer.player = video
//}
performSegue(withIdentifier: "segue", sender: nil)
}
func apply_round(_ object: AnyObject){
if #available(iOS 12.0, *) {
object.layer.cornerRadius = object.frame.size.width/4
} else {
// Fallback on earlier versions
}
object.layer.masksToBounds = true
}
}