SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.31k stars 743 forks source link

Fix BaseView functions being not overridable #318

Closed fl034 closed 5 years ago

fl034 commented 5 years ago

When you override a function that is implemented in an extension you get this error:

Overriding non-@objc declarations from extensions is not supported

Bildschirmfoto 2019-05-24 um 12 49 33

So I fixed it by removing the extensions. I also made removed the private modifier of updateShadowPath to make it callable from subclasses.

wtmoose commented 5 years ago

You shouldn't need to call updateShadowPath() because it's called in layoutSubviews(). configureDropShadow() doesn't need to call it.

configureDropShadow() is a convenience function and isn't meant to be overridden. If you want a different drop shadow, define your own function configureDropCustomShadow() and call it instead of configureDropShadow().