
Set up a structured iOS project by organizing supporting files, extensions, helpers, models, and SwiftUI and UIKit views into clearly named folders, plus JSON payloads and API response models.
Create a home UI model to map backend json payloads to the front end, using hashable sections and items like banners, headers, and course lanes.
Build a main banner view in SwiftUI by loading an async image with a gray placeholder, then display a title and caption in a leading vertical stack.
swap the unsplash image endpoint with the Picsum image API to ensure landscape images load when unsplash servers are down, by updating the payload with the new endpoint.
Embed a SwiftUI main banner view into a UIKit collection view cell using a UIHostingController, configuring image link, title, and caption, with snap kit auto layout.
Add a main banner collection view cell to a collection view using a diffable data source and a compositional layout, including cell registration, snapshot updates, and sections.
Remove the collection view background color and use a compositional layout to render sections and items, with a default data source, group specifications, and applying snapshots.
Learn to build a text header collection view cell with an attributed tappable label, configure tappable text, and handle taps via an on-tap closure using SnapKit for layout.
https://gist.github.com/kelvinfok/76ac61fe950fa0f736e135a418b1e6d4
Refactor the attributed tappable label height function into a static function accepting font and text, and use it to compute height with the collection view's frame width.
Embed a SwiftUI cost view inside a UIKit collection view cell using a UIHostingController, configure the hosting controller with the cost view, and pin its root view to the cell.
Add a categories text header in a server-driven UI by updating the data source and UI model, and configure a text header with a four-line limit and padding.
https://gist.github.com/kelvinfok/29f1a90976fb85a04ddaaeff9574687e
Integrate the categories collection view cell into the collection view by wiring a hosting controller to a titles array and configuring a horizontal compositional layout with insets.
Learn to add a new course swimlane in a server-driven iOS app, updating section models, banners, and IDs, and prepare for API-driven dynamic content and tap navigation.
Add featured course view by reusing the existing cost view, remove the tag, and adjust height properties to 140 in the canvas for iOS development.
Embed the featured course collection view cell into the collection view using a SwiftUI hosting controller, register and configure the cell, and implement a compositional layout for the featured section.
Build a reusable Udemy business view in SwiftUI, featuring a vertical stack with a label, SF symbols icons, and a bottom indigo bordered button for collection view integration.
Integrate the Udemy Business collection view cell into a collection view using SwiftUI hosting controller, handle tap gestures, and configure a banner layout with compositional layout and data source setup.
Implement and bubble up component tap gestures from collection view cells and headers to the collection view and view controller, enabling category and course taps to route via MVVM.
Explore server/backend-driven UI in iOS by routing from a cost details view controller to a course detail view and opening the Udemy business link in a Safari web view.
Clean up tap events in the course UI by simplifying handlers for course item and banner taps, standardizing file names, removing warnings and unused values, and adopting a break-based implementation.
https://gist.github.com/kelvinfok/defa05ffa1906f1fe084522ee65cba24
https://gist.github.com/kelvinfok/f7dd16fcda1e81b5e55b109478044186
Clean up the api response by removing unused hashable conformance and extraneous coding keys, keeping only type, id, and value to streamline server-driven ui.
Learn to fetch a remote JSON payload and drive the UI from a server, replacing flaky Unsplash endpoints with a reliable image provider and integrating a Swift Combine-based API client.
Hi Students, please find the source code attached. Good luck!
Welcome to the iOS & Swift: Server/Backend-Driven UI for Dynamic Apps course!
In this course, we learn to create dynamic & responsive user interfaces by leveraging backend data to shape the layout and content of our app's frontend. Concurrently, we utilized the robust capabilities of 2 native Swift SDKS - UICollectionViewCompositionalLayout & UICollectionViewDiffableDataSource alongside SwiftUI to achieve this.
Throughout the course, we will build the unofficial Udemy iOS home screen, incorporating industry leading practices to integrate modular SwiftUI views into a UIKit-based project. Additionally, we will layout views using the SnapKit library, enhancing our skills in interface design and implementation.
By embracing the Server/Backend-Driven UI design principle into our development workflow, we seamlessly integrate backend data to drive the layout and content of our app's frontend. This approach not only enhances flexibility and adaptability but also guarantees a uniform and captivating user experience across diverse devices and screen sizes.
Noteworthy companies employing the Server/Backend-Driven UI strategy include Uber, Spotify, Reddit, Airbnb, SnapChat & Lyft.
This course is designed for experienced iOS developers with at least three years of working experience and a strong foundation in UIKit, who are eager to explore SwiftUI's capabilities.
By the end of this course, you'll master the skills and confidence needed to implement dynamic frontend designs utilizing the Server/Backend-Driven UI principle in your own production apps.