Implicitly unwrapped optional in Apple methods
问题 I'm trying to switch from Objective-C to Swift. I don't understand the point of declaring a function to return a AnyObject! instead of AnyObject? . For example: func instantiateViewControllerWithIdentifier(identifier: String) -> AnyObject! Why does this method return an implicitly unwrapped optional and not a simple optional? I get the AnyObject part, but what's the point of allowing us to avoid using the ! to unwrap the optional if it may be nil? (thus crashing the app, even if it's very