-
Alert
We can display an alert using the .alert modifier. Take a look at the code: The role of the button can be: Note that using a button with .destructive is also added the default cancel button
-
LazyGrid
In SwiftUI we have two powerful and efficient grids to display multiple items: The fundamental element for these types of grids is the GridItem, which can be of three types: GridItem Adaptive GridItem Adaptive is essential for a responsive layout. By setting a minimum size for it, the grid will try to adapt to all…
-
ScrollView – Carousel
Apart from the List, there is another component for creating a scrollable view of items: the ScrollView. This component allows scrolling vertically (by default) and horizontally. To learn how to use this component, we will create a carousel. We often see complex interfaces built using carousel components, as seen on Netflix, Amazon, and others. Let’s…
-
REST – Episode III – Obsevation Framework
In this post, we’ll take a look at the Observation framework. The idea is that this framework will replace Combine, so for those starting to develop on iOS now, it’s better to start with it – it’s the future. Let’s see how it works using the structures from the first episode SwiftUI and REST (Episode…
-
SwiftUI – Episode II – POST and Authentication
In this post, we’ll learn how to perform POST requests and use a bearer token to access REST APIs that require authentication. At the end of the post, you’ll find a link to the GitHub project, which includes the code for the mobile application as well as a simple server for testing purposes. Post First,…
-
Rest – Episode I° – Get
In this episode, we will see how to implement a GET request. In the next one, we’ll explore how to make a POST request, and in the last one, we’ll examine different solutions. Suppose we want to search for books using the Google Books API: https://www.googleapis.com/books/v1/volumes?q=intitle:your-word. The idea is to write the search text in…