Open Katafalkas opened 8 years ago
Hey. This is not bug nor it is an issue. Rather a question someone in this project could answer.
Is there a way of creating a subclass that would use UIStackView or OAStackView as a superclass depending on ios version ?
something like that ? (this does not work)
if #available(iOS 9.0, *) { class StackView: UIStackView {} } else { class StackView: OAStackView {} }
Any ideas of achieving something similar ?
Swift's type system won't let you do this. The compiler can't guarantee that UIStackView and OAStackView are isomorphic, and there's no facility for ensuring it anyway.
Is this a dupe of #2?
Hey. This is not bug nor it is an issue. Rather a question someone in this project could answer.
Is there a way of creating a subclass that would use UIStackView or OAStackView as a superclass depending on ios version ?
something like that ? (this does not work)
Any ideas of achieving something similar ?