In Swift, what's the difference between calling UINavigationController() vs UINavigationController.init()?
问题 In Swift, what's the difference between calling UINavigation() vs UINavigation.init() ? They both seem to return valid instance of UINavigationController . 回答1: UINavigationController() and UINavigationController.init() are the exact same thing. You can verify this by typing both into a Playground and then option -clicking on them. Both bring up the documentation for the same initializer. The Swift convention is to use just the type name (without .init ). 回答2: For some given type (e.g.