material-components-ios
material-components-ios copied to clipboard
[BottomNavigation] Lack of designated initializers causes crash in Swift subclass
A clear and concise description of what the bug is.
Reproduction steps
Steps to reproduce the behavior:
- Create
MDCBottomNavigationBarControllersubclass in Swift - Create a custom initializer that calls
super.init(nibName:bundle:)
Expected behavior
Designated initializers should be overriden and initialize MDCBottomNavigationBarController properties.
Actual behavior
App will crash in viewDidLoad() on loadConstraints() due to navigationBar being null and init inaccessible as an initializer from the subclass.
Platform (please complete the following information)
- Device: All
- OS: iOS 14.4
- MaterialComponents: 123.0.0
Additional context
Also noticed https://github.com/material-components/material-components-ios/pull/6038 fixed this but was closed.