-
Customize TextField
The most commonly used component to insert text is the TextField. We usually use it like this: This is the classic way, and it’s fine. Sometimes we need to change the placeholder text color and size, as well as the color and size of the typed text. Take a look at the code below to…
-
Customize Toggle
Sometimes, to provide a better user experience, we need to customize components. In this post, we’ll see how to customize the Toggle, as shown in the image: Take a look at the code: So we call the Toggle in the usual way, but we add a custom style to it. Now, let’s see how to…
-
Select Photos from the gallery
In SwiftUI, it’s possible to select a photo (or multiple photos) from the gallery and use them in an application. The main component for this is PhotosPicker. When a photo is selected, it’s stored in a PhotosPickerItem. It’s also possible to select videos, not just photos. We can specify the type of media to display…
-
Scan QR code
If your app requires QR code scanning capabilities, or if you’re simply interested in this topic, you might find this post useful. First, we’ll craft the primary view, integrating a toolbar button that unveils a sheet dedicated to scanning, with the QR code displayed centrally upon detection. Subsequently, we’ll delineate the sheet featuring a closure…
-
Adding Events to the Calendar in SwiftUI Using Default UI
In this post, we learn how to use the default view to add an event to the calendar without creating a new one, if we don’t need a customized view. I mean this (sorry, today I’m lazy and don’t want to change my phone’s language to English). I advise you to take a look at…
-
Adding Events to the Calendar
We’ve learned (read-events-from-the-calendar) how to read calendar events. In this post, we’ll learn how to add an event to the calendar. We’ll follow these steps: Let’s start by adding a new function, addEvent, in the EventStoreManager: (please get the code of the EventStoreManager from the previous post). In this tutorial, we’ll create an event on…