<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ios on Feel the magic of kool.</title><link>https://vladde.net/tags/ios/</link><description>Recent content in Ios on Feel the magic of kool.</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 12 Oct 2026 01:15:58 +0200</lastBuildDate><atom:link href="https://vladde.net/tags/ios/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Swift macros for better DX</title><link>https://vladde.net/blog/swift-macros-for-ourselves/</link><pubDate>Mon, 12 May 2025 00:00:00 +0200</pubDate><guid>https://vladde.net/blog/swift-macros-for-ourselves/</guid><description>&lt;p>When migrating our app to become Swift 6 compatible, I took the opportunity to take a look into Swift macros, since our storage helper had a lot of duplicate boilerplate code.&lt;/p>
&lt;h2 id="using-macros">Using macros&lt;/h2>
&lt;p>Mapping API data models to Core Data models included a lot of (almost) duplicate code for every method: calling code in the correct context, fetching existing (or creating new) models, saving context, etc.&lt;/p>
&lt;p>I created a macro which smooths out this process, while still being type-safe. This is what a mapping method looks like:&lt;/p></description></item><item><title>SwiftUI iOS list styles (with images)</title><link>https://vladde.net/blog/swiftui-ios-list-styles/</link><pubDate>Mon, 02 Oct 2023 09:17:48 +0200</pubDate><guid>https://vladde.net/blog/swiftui-ios-list-styles/</guid><description>&lt;h2 data-rfc-heading=plain id=introduction>Introduction&lt;/h2>
&lt;p>SwiftUI provides multiple styles for list, but it might not always be obvious what difference there are between them.&lt;/p>
&lt;p>This is a comparison grid of all iOS list styles, described in [&lt;a href="https://developer.apple.com/documentation/swiftui/liststyle">STYLES&lt;/a>]. The code for the list is written out at the bottom of the page.&lt;/p>
&lt;h2 id="comparisons">Comparisons&lt;/h2>
&lt;div style='display: grid; grid-template-columns: 1fr 1fr; align-items: start;'>
 &lt;figure>
 &lt;figcaption>.plain&lt;/figcaption>
 &lt;img alt='plain style list' width=1170 height=876 src=plain.png>
 &lt;/figure>
 &lt;figure>
 &lt;figcaption>.inset&lt;/figcaption>
 &lt;img alt='inset style list' width=1170 height=876 src=inset.png>
 &lt;/figure>
 &lt;figure>
 &lt;figcaption>.grouped&lt;/figcaption>
 &lt;img alt='grouped style list' width=1170 height=876 src=grouped.png>
 &lt;/figure>
 &lt;figure>
 &lt;figcaption>.insetGrouped&lt;/figcaption>
 &lt;img alt='insetGrouped style list' width=1170 height=876 src=insetGrouped.png>
 &lt;/figure>
 &lt;figure>
 &lt;figcaption>.sidebar&lt;/figcaption>
 &lt;img alt='sidebar style list' width=1170 height=876 src=sidebar.png>
 &lt;/figure>
&lt;/div>
&lt;h3 id="code">Code&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-swift" data-lang="swift">&lt;span style="display:flex;">&lt;span>List {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Section {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Text(&lt;span style="color:#0ff;font-weight:bold">&amp;#34;Apple&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Text(&lt;span style="color:#0ff;font-weight:bold">&amp;#34;Banana&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } header: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Text(&lt;span style="color:#0ff;font-weight:bold">&amp;#34;Favorites&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } footer: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Text(&lt;span style="color:#0ff;font-weight:bold">&amp;#34;The fruits which are most tasty&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Section {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Text(&lt;span style="color:#0ff;font-weight:bold">&amp;#34;Orange&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="references">References&lt;/h2>
&lt;dl>
 &lt;dt>[STYLES]&lt;/dt>
 &lt;dd>Apple Inc., &lt;a href="https://developer.apple.com/documentation/swiftui/liststyle">ListStyle&lt;/a>, Apple Developer Documentation&lt;/dd>
&lt;/dl></description></item></channel></rss>