将“启用多个窗口”更改为“是”
然后在AppDelegate.swift中 -
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
var config = "Default Configuration"
if IS_IPAD {
print("IPAD - LOADING IPAD CONFIG - \(config)")
config = "ipad Configuration"
}
print("LOADING CONFIG - \(config)")
return UISceneConfiguration(name: config, sessionRole: connectingSceneSession.role)
}
这对我解决了问题,希望能帮到其他人。