<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oscar Navidad on Medium]]></title>
        <description><![CDATA[Stories by Oscar Navidad on Medium]]></description>
        <link>https://medium.com/@oscarnavidad?source=rss-ac13d9042878------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vT7l9Ui53IFIIZBg.</url>
            <title>Stories by Oscar Navidad on Medium</title>
            <link>https://medium.com/@oscarnavidad?source=rss-ac13d9042878------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 16:25:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oscarnavidad/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to SwiftUI: Building User Interfaces in Swift]]></title>
            <link>https://medium.com/@oscarnavidad/introduction-to-swiftui-building-user-interfaces-in-swift-9540f10e4e25?source=rss-ac13d9042878------2</link>
            <guid isPermaLink="false">https://medium.com/p/9540f10e4e25</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Oscar Navidad]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 22:02:30 GMT</pubDate>
            <atom:updated>2023-04-05T22:03:17.266Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*VQFFJONPu-Neq3iGxJyRFg.jpeg" /></figure><h3>1. What is SwiftUI?</h3><p>SwiftUI is an innovative and user-friendly framework introduced by Apple in 2019. Designed for Swift, it enables developers to create beautiful and responsive user interfaces for iOS, macOS, watchOS, and tvOS platforms using a declarative syntax. SwiftUI is built on Swift, which allows for seamless integration with existing Swift codebases and the ability to leverage Swift’s powerful features.</p><h3>2. The Declarative Syntax</h3><p>SwiftUI’s declarative syntax makes it easy to design user interfaces. In a declarative approach, you define what the interface should look like rather than specifying a series of steps to create it. This results in a more readable and maintainable codebase. For example, creating a text label in SwiftUI is as simple as writing:</p><pre>Text(&quot;Hello, SwiftUI!&quot;)</pre><h3>3. Views and Modifiers</h3><p>In SwiftUI, every user interface component is a View. Views can be composed together to create complex user interfaces. You can also customize the appearance and behavior of views using modifiers. For example, you can change the font, color, and alignment of a text label by chaining modifiers:</p><pre>Text(&quot;Hello, SwiftUI!&quot;) .font(.largeTitle) .foregroundColor(.blue) .multilineTextAlignment(.center)</pre><h3>4. State and Data Flow</h3><p>SwiftUI provides a robust data flow system that makes it easy to manage state and respond to changes in your app. It offers property wrappers like @State, @Binding, @ObservedObject, and @EnvironmentObject to handle different data flow scenarios. SwiftUI automatically updates the user interface when the data changes, ensuring a consistent and smooth experience.</p><h3>5. Previews and Live Preview</h3><p>SwiftUI’s Preview feature allows you to see the changes in your interface in real-time as you modify the code. This accelerates the development process and helps you quickly iterate on your designs. With Xcode’s live preview, you can even interact with your interface, making it easy to test and refine your app’s behavior without having to run it on a device or simulator.</p><h3>6. Cross-Platform Compatibility</h3><p>One of the key benefits of SwiftUI is its compatibility with multiple Apple platforms. You can share a substantial portion of your codebase across iOS, macOS, watchOS, and tvOS, streamlining development and maintenance. While some platform-specific adjustments might be necessary, SwiftUI’s core functionality remains consistent across devices.</p><h3>7. Getting Started with SwiftUI</h3><p>To start using SwiftUI, you need Xcode, which is available for free on the Mac App Store. Make sure you have Xcode version 11 or later installed, as SwiftUI is not supported in earlier versions. When creating a new project in Xcode, simply select the “Use SwiftUI” option to begin building your app with SwiftUI.</p><h3>Conclusion</h3><p>SwiftUI is a powerful and accessible framework for creating user interfaces across Apple platforms. With its declarative syntax, built-in state management, and live previews, SwiftUI simplifies and streamlines app development. As SwiftUI continues to evolve and mature, it’s becoming an increasingly popular choice for developers building apps for the Apple ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9540f10e4e25" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>