Swift Optional of Optional
问题 For a project of mine, I have to create a proxy AppDelegate that will forward calls to a another AppDelegate. UIApplicationDelegate havs a var window: UIWindow? . My question is, why can't I do this: private lazy var realAppDelegate: UIApplicationDelegate = { return AppDelegate() }() var window: UIWindow? { get { return realAppDelegate.window } set { realAppDelegate.window = newValue } } The problem with that code is that realAppDelegate.window is a UIWindow?? . Does anybody know why? 回答1: