SwiftUI WebPage — Advanced Navigation, Loading, and HTML Control
In my previous video, we built a simple SwiftUI WebView using just a URL, but that approach has its limits. In this follow-up, we unlock the full potential of WebPage in SwiftUI’s new WebKit integration. You’ll learn how to: • Display page titles dynamically as you navigate • Show a loading progress bar with smooth transitions • Load custom HTML directly from strings or from files in your bundle • Use a URLRequest for full control over headers, caching, and HTTP methods • Add back and forward navigation buttons, plus reload and stop controls • Implement history tracking with context menus for quick jumps • Restrict navigation to a specific host domain with a custom navigation decider We’ll build everything step-by-step, starting from a simple tab layout and ending with a feature-rich, customizable browser component. If you want to support my work, you can buy me a coffee :) https://ko-fi.com/stewartlynch My Newsletter https://stewartlynch.kit.com My Channel Application - Free https://stewartlynch.gumroad.com/l/obsjz My full length multi-target course to build a Mac Menubar app, an iOS App with WIdgets and a WatchKit app https://stewartlynch-school.teachable.com/p/smile4me-swift-swiftui-app Table of Contents: 0:00 Introduction 2:48 Basic WebView with WebPage URL and ProgressView 7:39 Basic WebView with WebPage URL Request 9:18 Loading HTML 13:38 WebPage Navigation 17:35 Navigation History 21:34 Decided Navigation Starter Project Files: https://github.com/StewartLynch/Advanced-WebKit Completed Project: https://github.com/StewartLynch/Advanced-WebKit/tree/completed References mentioned in video: Artem's Blog: https://www.artemnovichkov.com/blog/handling-webview-navigation-in-swiftui Mastering iOS 26 Toolbars & Modal Sheets in SwiftUI https://youtu.be/IiLDbrtBsn0 Recommended Resources: RocketSim - Build Apps Faster https://gumroad.com/a/122988499/ftvbh BigMountain Studio Books SwiftData Mastery in SwiftUI https://www.bigmountainstudio.com/swiftdata/77jt8 SwiftUI Views Mastery https://www.bigmountainstudio.com/views-16/77jt8 SwiftUI 5 Book Bundle https://www.bigmountainstudio.com/book-bundle/77jt8 Combine Mastery in SwiftUI https://www.bigmountainstudio.com/combine/77jt8 Core Data Mastery in SwiftUI https://www.bigmountainstudio.com/core-data/77jt8 SwiftUI Animations Mastery https://www.bigmountainstudio.com/animations-16/77jt8 Other References: Stewart Lynch's YouTube Channel: https://youtube.com/@StewartLynch Stewart Lynch on Mastodon: https://iosdev.space/@StewartLynch Stewart Lynch on BlueSky: @stewartlynch.bsky.social Stewart Lynch On Threads: @StewartLynch Stewart Lynch on X: https://x.com/StewartLynch Stewart Lynch on LinkedIn https://www.linkedin.com/in/stewartlynch
Download
0 formatsNo download links available.