So I created a new project in Xcode11, set the AppDelegate to my new VC and commented the code present in xxx scene delegate to not have the UIKit part:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow()
window?.makeKeyAndVisible()
let controller = MainVC()
window?.rootViewController = controller
return true
}
In my UIViewController I wanted to set the background colour,
import UIKit
class MainVC : UIViewController {
override func viewDidLoad() {
view.backgroundColor = .red
self.view.backgroundColor = .blue
print("main Screen showing")
ConfigureUI()
setupUI()
}
But the result is a blackScreen in Simulator. Not even taking the code from other projects would help...
I've done this before in the other Xcode versions and should had work. Any ideas?
PS: The App gets in the ViewController, I can print in the console, but the screen is black.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…