swift - Should I still subclass from NSObject for data models in my iOS app? -
swift - Should I still subclass from NSObject for data models in my iOS app? -
this question has reply here:
swift native base of operations class or nsobject 6 answerswith swift, it's no longer necessary inherit nsobject. should still subclass nsobject info model classes in ios app?
the main benefit of subclassing nsobject
when bridging objective-c code, class bridged over. if have bare swift class
, not visible via objective-c bridge.
you can decide whether or not want subclass nsobject
based on whether or not want maintain objective-c compatibility.
swift
Comments
Post a Comment