Xcode 11,主界面修复 Main.storyboard
Xcode 11, Main Interface fixed with Main.storyboard
主界面在Xcode11中没有随另一个故事板变化,它总是运行与Main.storyboard在与另一个故事板改变后,我已经检查"is initial View Controller"使用后新情节提要中的视图控制器。
我在 Xcode 10 测试过,它工作正常。
我是不是在 Xcode 11 中遗漏了什么?
在列表中。
能否将 "Main storyboard file base name" 更改为您的故事板文件名。
Swift 5 与 iOS 13
One more changes require in info.plist file under Application
Scene Manifest group.
在应用程序场景清单中也更改名称。
补充:
如果要创建没有故事板 的根 window ,您需要从 [= 中删除 Main storyboard file base name
和 Storyboard Name
项35=],并在 SceneDelegate
:
中以编程方式创建 window
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
@available(iOS 13.0, *)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
// continue to create view controllers for window
}
//......
}
主界面在Xcode11中没有随另一个故事板变化,它总是运行与Main.storyboard在与另一个故事板改变后,我已经检查"is initial View Controller"使用后新情节提要中的视图控制器。
我在 Xcode 10 测试过,它工作正常。
我是不是在 Xcode 11 中遗漏了什么?
能否将 "Main storyboard file base name" 更改为您的故事板文件名。
Swift 5 与 iOS 13
One more changes require in info.plist file under Application Scene Manifest group.
在应用程序场景清单中也更改名称。
补充:
如果要创建没有故事板 的根 window ,您需要从 [= 中删除 Main storyboard file base name
和 Storyboard Name
项35=],并在 SceneDelegate
:
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
@available(iOS 13.0, *)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
// continue to create view controllers for window
}
//......
}