Tag Archives: Swift

SwiftUI – MVVM

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 »

SwiftUI – How to show an Alert

By | 03/02/2021

In this post, we will see how to implement an Alert in SwiftUI. We create a project called AlertTest and add this code in the file ContentView: [CONTENTVIEW.SWIFT] This is all and now, if we run the application, this will be the result:

SwiftUI – Tips for button

By | 13/01/2021

In this post, we will see three tips that might help us to create buttons in our applications. First of all, we open Xcode, we create an iOS project called TestButton and we add three buttons: Then, we create a new Swift file called ButtonStyleCustom where we will define the style that we will use… Read More »

iOS app – The word clock v. 2.0

By | 04/01/2021

I am very happy starting the 2021 with the new version of TheWordClock.In these release, I have fixed some bugs and I have introduced the alarm clock. If you want to download it, find “Thewordclock” in the App Store or go to:https://apps.apple.com/it/app/thewordclock/id1533151993?l=en

iOS app – The word clock

By | 06/10/2020

Finally, I have deployed my app called ”The word clock”.It is a nice word clock for iPhone, where minutes and hours aren’t static but they change their position.This is the first version and it shows only the time.In the next version, I will add other features like alarm and widget. If you want to download… Read More »

SwiftUI – clipShape()

By | 23/09/2020

In this post, we will see how to use clipShape() in order to clip an image controlling its shape.But what is clipShape()?From Apple developer web site:“Sets a clipping shape for a view.Use clipShape(_:style:) to clip the view to the provided shape. By applying a clipping shape to a view, you preserve the parts of the… Read More »