The title summarized my problem. I'm new to coding and I don't understand how to solve the problem.
I've tried pretty much all I know.
import UIKit import AVKit import AVFoundation class ViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) } @IBOutlet weak var PowerLVLlabel: UILabel! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func randomNumber(_ sender: Any) { let randomNumber = Int.random(in: 1000...10000) PowerLVLlabel.text = String(randomNumber) if case { randomNumber; >=9000 == (true); func playVideo() { guard let path = Bundle.main.path(forResource: "over 9000", ofType:"mp4") else { debugPrint("over 9000.mp4 not found") return } {let player = AVPlayer(url: URL(fileURLWithPath: path)) let playerController = AVPlayerViewController() playerController.player = player present(playerController, animated: true) } {player.play() }
PowerLVLlabelwith small letterpowerLVLlabel