A cute trick from Code In Swift removes the annoying requirement that all UIViewController subclasses require init(coder:).
Use the Available keyword for both UIViewController & UIViews. I suspect this would also work for NS objects.
https://codeinswift.io/how-to-prevent-xcode-asking-for-required-initializer-init-coder-in-every-subclass-of-uiviews-c67054284fc2
No comments:
Post a Comment