Mis à jour le 06/03/2020
Implement data model and logic
- Describe the iOS Data Model implementation
What elements data model can be represented by?Attention, plusieurs réponses sont possibles.
How can data model components interact with each other
Data model components can incorporate other components in a form of properties of inheritance.
Data model objects can only inherit original Swift classes, but not other data model classes of the application.
Data model objects can inherit other data model objects, but other data model classes can not be used as property type.
Data model components should be stand alone, they can only interact with each other via controller.
How can we access an image from image asserts catalogue programmatically?
- let image = UIImage.getImage(named: "image-name")
- let image = UIImage.init(named: "image-name")
- let image = AssetCatalogue.get("image-name")
It's not possible, asset catalogue images are only accessible via Interface Builder