<?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: KevinLeeeee323</title>
    <description>The latest articles on DEV Community by KevinLeeeee323 (@kevinleeeee323).</description>
    <link>https://dev.to/kevinleeeee323</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4032941%2F24b0edd0-4b6e-4f9d-8c15-4eed546f8e49.png</url>
      <title>DEV Community: KevinLeeeee323</title>
      <link>https://dev.to/kevinleeeee323</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kevinleeeee323"/>
    <language>en</language>
    <item>
      <title>5 Painful Bugs I Hit Building an iOS EPUB Reader with SwiftUI + WKWebView</title>
      <dc:creator>KevinLeeeee323</dc:creator>
      <pubDate>Fri, 17 Jul 2026 01:48:40 +0000</pubDate>
      <link>https://dev.to/kevinleeeee323/5-painful-bugs-i-hit-building-an-ios-epub-reader-with-swiftui-wkwebview-319c</link>
      <guid>https://dev.to/kevinleeeee323/5-painful-bugs-i-hit-building-an-ios-epub-reader-with-swiftui-wkwebview-319c</guid>
      <description>&lt;p&gt;I got tired of reaching out of my blanket to tap the screen every page, so I built SwiftBook: an Apple Books-style EPUB reader for iOS that lets you turn pages with the volume buttons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fshygu3gnfcm981aap9os.JPEG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fshygu3gnfcm981aap9os.JPEG" alt="UI Display" width="800" height="805"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fddkxm30gsbnx3zhqx5ms.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fddkxm30gsbnx3zhqx5ms.gif" alt="Use Volum Button As Page Turner" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import EPUBs → read with tap / swipe / progress bar / &lt;strong&gt;volume button&lt;/strong&gt; page turns&lt;/li&gt;
&lt;li&gt;5 fonts (PingFang, Source Han Serif Regular/SemiBold/Bold, Georgia)&lt;/li&gt;
&lt;li&gt;4 reading themes (white · warm · dark · eye-care green)&lt;/li&gt;
&lt;li&gt;Font size, line spacing, margins, alignment — all adjustable&lt;/li&gt;
&lt;li&gt;Resume reading, TOC with chapter jump&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tech stack&lt;/strong&gt;: SwiftUI + WKWebView. Pagination uses CSS multi-column layout rather than native scroll. Volume button detection uses AVAudioSession KVO + a silent looping WAV to keep the audio session alive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The README has a detailed "Lessons Learned" section&lt;/strong&gt; covering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why WKWebView dimensions must be constant (or pages jump around)&lt;/li&gt;
&lt;li&gt;The quote-escaping bug that silently broke ALL JS interactivity&lt;/li&gt;
&lt;li&gt;Why you can't read @Binding during loadContent (progress reset to 0%)&lt;/li&gt;
&lt;li&gt;Gesture arena conflicts between tap zones and swipe on WebView&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/KevinLeeeee323/SwiftBookApp" rel="noopener noreferrer"&gt;https://github.com/KevinLeeeee323/SwiftBookApp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MIT licensed. Free to use, modify, contribute. Built with help from Claude / Codex / Deepseek.&lt;/p&gt;

&lt;p&gt;Would love feedback — this is my first iOS app!&lt;/p&gt;

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