Launch iOS simulator from Xcode and getting a black screen, followed by Xcode hanging and unable to stop tasks

后端 未结 26 2491
一整个雨季
一整个雨季 2020-11-29 05:16

I\'m having trouble running my basic iPhone application (while going through the Stanford iTunes CS193p lectures) in the iOS simulator.

I\'ve been searching for a wh

26条回答
  •  [愿得一人]
    2020-11-29 05:30

    I solved this question with set window background color like this in iOS 13:

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        guard let _ = (scene as? UIWindowScene) else { return }
        if let windowScene = scene as? UIWindowScene {
            window = UIWindow(windowScene: windowScene)
            window?.backgroundColor = .white
            let storyBoard = UIStoryboard(name: "Main", bundle: nil)
            
            // workaround for svprogresshud
            let appDelegate = UIApplication.shared.delegate as! AppDelegate
            appDelegate.window = window
        }
    }
    

提交回复
热议问题