<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fabio Floris</title>
    <description>The latest articles on DEV Community by Fabio Floris (@fabio_floris_155a63b665be).</description>
    <link>https://dev.to/fabio_floris_155a63b665be</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3644148%2F4aa174a3-b02a-42a8-a532-8bbe8213ca5d.png</url>
      <title>DEV Community: Fabio Floris</title>
      <link>https://dev.to/fabio_floris_155a63b665be</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fabio_floris_155a63b665be"/>
    <language>en</language>
    <item>
      <title>A Modern SwiftUI Technique for Detecting Device Orientation</title>
      <dc:creator>Fabio Floris</dc:creator>
      <pubDate>Wed, 03 Dec 2025 19:18:24 +0000</pubDate>
      <link>https://dev.to/fabio_floris_155a63b665be/a-modern-swiftui-technique-for-detecting-device-orientation-3hl8</link>
      <guid>https://dev.to/fabio_floris_155a63b665be/a-modern-swiftui-technique-for-detecting-device-orientation-3hl8</guid>
      <description>&lt;p&gt;Detecting whether your app is in portrait or landscape sounds simple, until you try it in SwiftUI.&lt;br&gt;
With UIScreen.main deprecated in iOS 18 and size classes still inconsistent on iPad, many devs end up with unpredictable layouts or broken keyboard behavior.&lt;/p&gt;

&lt;p&gt;I wrote a full breakdown of a reusable approach using window geometry updates.&lt;br&gt;
The initial spark came from a great example shared by Artem Mirzabekian.&lt;/p&gt;

&lt;p&gt;Inside the article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why SwiftUI struggles with orientation&lt;/li&gt;
&lt;li&gt;pitfalls of relying on size classes&lt;/li&gt;
&lt;li&gt;building a modern ViewModifier for window tracking&lt;/li&gt;
&lt;li&gt;exposing orientation via an environment value&lt;/li&gt;
&lt;li&gt;complete code + reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Read the full article: &lt;a href="https://medium.com/@fabiofloris/a-reusable-orientationreader-for-swiftui-that-doesnt-break-when-the-keyboard-appears-c44fc18196c4" rel="noopener noreferrer"&gt;A Reusable OrientationReader for SwiftUI (that doesn’t break when the keyboard appears)&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're building responsive SwiftUI interfaces, this might save you some time.&lt;/p&gt;

</description>
      <category>ios</category>
      <category>swiftui</category>
      <category>mobile</category>
      <category>swift</category>
    </item>
  </channel>
</rss>
