You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, we need to patch some handy instance functions for the button, I would naturally think we can subclass it, then we can use the shared handy function everywhere, and make UI configs consistent
sth like:
clsss CustomButton: LGButton {
init(withButtonTitle){
super.init()
// custom config
// ....
}
func enableButton() {
self.isEabled = true
// other custom UI change to enabled button
// ...
}
func disableButton() {
// counterpart to enableButton.
}
//.. other functions needed per custom requirements
}
The text was updated successfully, but these errors were encountered:
I integrated LGButton as pod module, notice that in swift 4.2 LGButton is public but not open, so xcode throws following error when I tried to subclass it.
Cannot inherit from non-open class 'LGButton' outside of its defining module
Any suggestion ?
10000TB
changed the title
Is there a way we can subclass LGButton ?
Make LGButton open, so subclassable ?
Jan 27, 2019
For example, we need to patch some handy instance functions for the button, I would naturally think we can subclass it, then we can use the shared handy function everywhere, and make UI configs consistent
sth like:
The text was updated successfully, but these errors were encountered: