以下是一些在圣诞节前工作的代码:
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application (
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [ UIApplicationLaunchOptionsKey : Any ]?
) -> Bool {
window = UIWindow( frame: UIScreen.main.bounds )
return true
}
我在圣诞节前将我的项目更新到Swift 4.0(.2),回来并运行应用程序以发现相同的代码现在抛出了这个问题中提到的异常。有什么变化吗?