In Swift, what's the difference between calling UINavigationController() vs UINavigationController.init()?

后端 未结 3 1927
时光取名叫无心
时光取名叫无心 2020-12-04 00:46

In Swift, what\'s the difference between calling UINavigation() vs UINavigation.init()? They both seem to return valid instance of UINavigati

3条回答
  •  遥遥无期
    2020-12-04 01:51

    From Apple docs, you use init when you are subclassing the controller. It looks like without passing a value to the unit function, it just returns a standard UINavigationController

    https://developer.apple.com/reference/uikit/uinavigationcontroller

提交回复
热议问题