Tag Archives: Swift, SwiftUI

SwiftUI – AnyLayout

By | 15/02/2023

In this post, we will see how to use the new component AnyLayout introduced in SwiftUI 4.But first of all, what is AnyLayout?From Apple developer web site:“Use an AnyLayout instance to enable dynamically changing the type of a layout container without destroying the state of the subviews”In a nutshell, with AnyLayout we can switch for example between… Read More »

Swift – Core Data

By | 30/11/2022

In this post, we will see how to use Core Data in an iOS project.But first if all, what is Core Data?From Apple web site:“Core Data is a framework that you use to manage the model layer objects in your application. It provides generalized and automated solutions to common tasks associated with object life cycle… Read More »

Swift – Class (Part II)

By | 30/03/2022

Swift – Class (Part I) MULTIPLE INITIALIZERS If we run this code, these will be the results: DEINITIALIZERDeinitialization is a process used to deallocate the memory space before a class instance deallocated. The ‘deinit’ keyword is used to deallocate the memory spaces occupied by the system resources. If we run this code, these will be… Read More »

Swift – Struct

By | 09/03/2022

In this post, we will see how to use Struct in Swift.But first of all, what is a Struct?:From Apple web site: “Use structures to represent common kinds of data. Structures in Swift include many features that are limited to classes in other languages: They can include stored properties, computed properties, and methods. Moreover, Swift… Read More »

Design Patterns – MVVM in SwiftUI

By | 14/07/2021

In this post, we will see how to implement MVVM pattern in SwiftUI.But, what is MVVM pattern?From wikipedia:“Model–view–viewmodel (MVVM) is a software architectural pattern that facilitates the separation of the development of the graphical user interface (the view) – be it via a markup language or GUI code – from the development of the business logic or back-end logic (the model) so that the view is not dependent on any… Read More »