<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Swift on Mike Gopsill</title>
    <link>https://www.mikegopsill.com/tags/swift/</link>
    <description>Recent content in Swift on Mike Gopsill</description>
    <generator>Hugo -- 0.165.0</generator>
    <language>en</language>
    <lastBuildDate>Tue, 24 Jun 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.mikegopsill.com/tags/swift/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Swift Classes &amp; Inheritance</title>
      <link>https://www.mikegopsill.com/posts/swift-classes-inheritance/</link>
      <pubDate>Tue, 24 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-classes-inheritance/</guid>
      <description>&lt;p&gt;Classes are a fundamental concept in &lt;strong&gt;Object-Oriented Programming (OOP)&lt;/strong&gt; and a cornerstone of Swift. In OOP, we model complex systems by creating &amp;ldquo;objects&amp;rdquo;—self-contained units that bundle data (properties) and behavior (methods). A class is the blueprint for creating these objects.&lt;/p&gt;
&lt;p&gt;Unlike &lt;a href=&#34;https://www.mikegopsill.com/posts/swift-structures/&#34;&gt;structures&lt;/a&gt;, classes have two key characteristics:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;: A class can inherit functionality from a parent class, allowing you to build hierarchies of related types.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reference Semantics&lt;/strong&gt;: Classes are &lt;em&gt;reference types&lt;/em&gt;. When you pass a class instance around, you&amp;rsquo;re passing a reference to the &lt;em&gt;same&lt;/em&gt; underlying object in memory.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&amp;rsquo;s look at a basic class:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Structures</title>
      <link>https://www.mikegopsill.com/posts/swift-structures/</link>
      <pubDate>Sun, 22 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-structures/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s talk about &lt;em&gt;structures&lt;/em&gt;, or &lt;code&gt;struct&lt;/code&gt;s as they&amp;rsquo;re known in code. Structures are a fundamental building block in Swift. They are versatile and widely used, from simple &lt;a href=&#34;https://www.mikegopsill.com/posts/swift-basic-data-types/&#34;&gt;data&lt;/a&gt; containers to more complex types with their own behavior.&lt;/p&gt;
&lt;h2 id=&#34;what-are-structures&#34;&gt;What are Structures?&lt;/h2&gt;
&lt;p&gt;A structure is a way to group related values together into a named type. Think of it like a blueprint for creating structures that hold specific kinds of data. For example, you could define a &lt;code&gt;struct&lt;/code&gt; to represent a 2D point with &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; coordinates, or a &lt;code&gt;struct&lt;/code&gt; to hold information about a book, like its &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;author&lt;/code&gt;, and &lt;code&gt;pageCount&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Enumerations</title>
      <link>https://www.mikegopsill.com/posts/swift-enumerations/</link>
      <pubDate>Sat, 21 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-enumerations/</guid>
      <description>&lt;p&gt;Enums provide a way to define a common type for a group of related values. Enums create distinct cases for these values. Then you can work with, switch over and iterate through these distinct cases, making your code much more clear.&lt;/p&gt;
&lt;h2 id=&#34;what-are-enumerations&#34;&gt;What are Enumerations?&lt;/h2&gt;
&lt;p&gt;Think of enums as a way to create your own custom set of options. For example, the days of the week, the suits in a deck of cards, or the different states an application can be in.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Optionals</title>
      <link>https://www.mikegopsill.com/posts/swift-optionals/</link>
      <pubDate>Tue, 17 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-optionals/</guid>
      <description>&lt;p&gt;When you start learning Swift, one of the concepts you&amp;rsquo;ll encounter early on is &lt;em&gt;optionals&lt;/em&gt;. Optionals are a powerful feature of Swift that help you write safer and more robust code by explicitly handling the possibility that a value might be missing. This post will explain what optionals are, why they are important, and how to work with them.&lt;/p&gt;
&lt;h2 id=&#34;what-is-an-optional&#34;&gt;What is an Optional?&lt;/h2&gt;
&lt;p&gt;In Swift, an optional is a type that can hold either a value or no value at all. When an optional doesn&amp;rsquo;t have a value, it&amp;rsquo;s said to be &lt;code&gt;nil&lt;/code&gt;. Think of it like a box: the box might contain an item, or it might be empty.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Closures</title>
      <link>https://www.mikegopsill.com/posts/swift-basics-closures/</link>
      <pubDate>Mon, 16 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-basics-closures/</guid>
      <description>&lt;p&gt;Closures are self-contained pieces of code that you can store and pass around your  codebase. Think of them as unnamed functions that can capture and store references to any &lt;a href=&#34;https://www.mikegopsill.com/posts/swift-variables-constants/&#34;&gt;constants and variables&lt;/a&gt; from the context in which they&amp;rsquo;re defined. If you&amp;rsquo;ve used &lt;a href=&#34;https://www.mikegopsill.com/posts/swift-basics-functions/&#34;&gt;functions&lt;/a&gt; in Swift, then you&amp;rsquo;ll soon grasp closures as they are actually a special case of closures.&lt;/p&gt;
&lt;p&gt;Closures are used very often in iOS development. You&amp;rsquo;ll see them in: completion handlers, animations, collection methods like &lt;code&gt;map&lt;/code&gt; and &lt;code&gt;filter&lt;/code&gt;, and SwiftUI view builders. Let&amp;rsquo;s look at them in more detail.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Functions</title>
      <link>https://www.mikegopsill.com/posts/swift-basics-functions/</link>
      <pubDate>Fri, 13 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-basics-functions/</guid>
      <description>&lt;p&gt;Functions are reusable blocks of code that perform specific tasks. They&amp;rsquo;re fundamental to organising your code, avoiding repetition, and making your programs easier to understand and maintain. Think of a function as a mini-program that takes some input, does something useful with it, and optionally gives you back a result.&lt;/p&gt;
&lt;p&gt;In Swift, functions are first-class citizens—you can pass them around, store them in variables, and use them just like any other &lt;a href=&#34;https://www.mikegopsill.com/posts/swift-basic-data-types/&#34;&gt;data type&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Control Flow</title>
      <link>https://www.mikegopsill.com/posts/swift-basics-control-flow/</link>
      <pubDate>Thu, 12 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-basics-control-flow/</guid>
      <description>&lt;p&gt;Today we&amp;rsquo;ll look at control flow statements like &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, and &lt;code&gt;switch&lt;/code&gt;. These statements are the decision makers of Swift, allowing you to create dynamic software. Understanding control flow means you can write code that can branch, loop, and make decisions based on the data it encounters.&lt;/p&gt;
&lt;h2 id=&#34;what-is-control-flow&#34;&gt;What is Control Flow?&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Control flow&lt;/em&gt; determines the order in which your code executes. Instead of just running line by line from top to bottom, control flow lets you skip sections, repeat operations, or choose between different paths based on conditions. It&amp;rsquo;s what transforms a simple list of instructions into intelligent software.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Operators</title>
      <link>https://www.mikegopsill.com/posts/swift-basics-operators/</link>
      <pubDate>Wed, 11 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-basics-operators/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve been working with Swift for a while, you&amp;rsquo;ve probably been using operators without giving them much thought. They&amp;rsquo;re the symbols that let you perform calculations, compare values, and combine logic. Some examples include &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, and &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;. Understanding operators properly will help you write cleaner, more expressive Swift code.&lt;/p&gt;
&lt;h2 id=&#34;what-are-operators&#34;&gt;What Are Operators?&lt;/h2&gt;
&lt;p&gt;An &lt;em&gt;operator&lt;/em&gt; is a symbol that tells Swift to perform a specific operation on one, two, or three values. They are like the verbs of programming, that perform action on &lt;a href=&#34;https://www.mikegopsill.com/posts/swift-basic-data-types/&#34;&gt;data types&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Basic Data Types</title>
      <link>https://www.mikegopsill.com/posts/swift-basic-data-types/</link>
      <pubDate>Tue, 10 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-basic-data-types/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re just getting started with Swift, you&amp;rsquo;ll quickly realise that everything revolves around data—numbers, text, true/false values, lists of things. Understanding Swift&amp;rsquo;s basic data types is like learning the alphabet before you write sentences. This post covers the essential building blocks you&amp;rsquo;ll use in every Swift project.&lt;/p&gt;
&lt;h2 id=&#34;what-are-data-types&#34;&gt;What are Data Types?&lt;/h2&gt;
&lt;p&gt;A &lt;em&gt;data type&lt;/em&gt; defines the kind of data you’re working with and what actions you can perform on it. Are you handling a number or a name? A true/false flag or a list of groceries? Swift is a &lt;em&gt;strongly typed&lt;/em&gt; language, which means you must be clear about what types you’re working with. Swifts compiler will catch errors early if you make mistakes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Variables &amp; Constants</title>
      <link>https://www.mikegopsill.com/posts/swift-variables-constants/</link>
      <pubDate>Mon, 09 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-variables-constants/</guid>
      <description>&lt;p&gt;Understanding variables and constants is one of the first steps in learning Swift. These building blocks will enable you to store, update, and manage data in your programs. In this post, we’ll cover what variables and constants are, how to use them, and why you should prefer one over the other depending on your use-case.&lt;/p&gt;
&lt;h2 id=&#34;what-are-variables&#34;&gt;What Are Variables?&lt;/h2&gt;
&lt;p&gt;A &lt;em&gt;variable&lt;/em&gt; is a named space in memory where you can store information that might change over time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to build URLs in Swift</title>
      <link>https://www.mikegopsill.com/posts/how-to-build-urls-in-swift/</link>
      <pubDate>Tue, 06 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/how-to-build-urls-in-swift/</guid>
      <description>&lt;p&gt;Building URLs safely and expressively is a common requirement in Swift applications—especially when dealing with REST APIs. In this post, we’ll explore four elegant approaches to construct URLs in Swift: manual string interpolation, Foundation’s &lt;code&gt;URLComponents&lt;/code&gt;, a custom URL‐builder DSL, and an enum‐driven router. By the end, you’ll have a clear sense of trade‐offs and patterns you can adopt in your own codebase.&lt;/p&gt;
&lt;h2 id=&#34;manual-string-interpolation&#34;&gt;Manual String Interpolation&lt;/h2&gt;
&lt;p&gt;The simplest approach is to build the URL by concatenating strings:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unraveling Swift Result Builders</title>
      <link>https://www.mikegopsill.com/posts/understanding-swift-result-builders/</link>
      <pubDate>Sun, 11 Jun 2023 08:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/understanding-swift-result-builders/</guid>
      <description>&lt;p&gt;In Swift 5.4, a powerful new feature was introduced that revolutionised how we can work with composable pieces of code: Result Builders. If you&amp;rsquo;ve written any SwiftUI code, you&amp;rsquo;ve probably already encountered this feature without realizing it. Result Builders underpin much of the magic that makes SwiftUI&amp;rsquo;s declarative syntax possible. However, their use isn&amp;rsquo;t limited to SwiftUI. In this blog post, we&amp;rsquo;re going to delve into Result Builders, what they are, and how you can use them to build more expressive and powerful APIs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Examples of Swift Property Wrappers</title>
      <link>https://www.mikegopsill.com/posts/examples-of-swift-property-wrappers/</link>
      <pubDate>Fri, 02 Jun 2023 08:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/examples-of-swift-property-wrappers/</guid>
      <description>&lt;p&gt;Swift&amp;rsquo;s property wrappers are a powerful tool that allows developers to change how properties are stored and manipulated while keeping their interfaces clean and consistent. This post will discuss some practical use cases for property wrappers.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started!&lt;/p&gt;
&lt;h2 id=&#34;1-userdefault-wrapper&#34;&gt;1. UserDefault Wrapper&lt;/h2&gt;
&lt;p&gt;UserDefaults is a straightforward mechanism to store small amounts of data persistently. We can simplify UserDefaults interactions with a &lt;code&gt;UserDefault&lt;/code&gt; property wrapper:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;@&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;propertyWrapper&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;struct&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;UserDefault&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;defaultValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;_&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;defaultValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;key&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kc&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;defaultValue&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;defaultValue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;wrappedValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;get&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UserDefaults&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;standard&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;forKey&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;T&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;??&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;defaultValue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;set&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;UserDefaults&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;standard&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;kr&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;newValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;forKey&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can now store and retrieve UserDefaults values effortlessly:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Swift Property Wrappers</title>
      <link>https://www.mikegopsill.com/posts/swift-property-wrappers/</link>
      <pubDate>Thu, 01 Jun 2023 08:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/swift-property-wrappers/</guid>
      <description>&lt;p&gt;Property Wrappers were introduced to Swift in 5.1. Initially, they can seem a bit mystifying. However, they&amp;rsquo;re a powerful tool, helping to streamline your code and make it more expressive. Today, we&amp;rsquo;ll demystify Property Wrappers and learn how to use them in Swift.&lt;/p&gt;
&lt;h2 id=&#34;what-exactly-is-a-property-wrapper&#34;&gt;What Exactly is a Property Wrapper?&lt;/h2&gt;
&lt;p&gt;Think of a Property Wrapper as a special kind of structure, class, or enumeration that &amp;ldquo;wraps&amp;rdquo; around a property in your code. This wrapper can add extra behaviour to the property, making it easier to manage and modify.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
