Write, review, or improve UIKit code following best practices for view controller lifecycle, Auto Layout, collection views, navigation, animation, memory management, and modern iOS 18–26 APIs. Use when building new UIKit features, refactoring existing views or view controllers, reviewing code quality, adopting modern UIKit patterns (diffable data sources, compositional layout, cell configuration), or bridging UIKit with SwiftUI. Does not cover SwiftUI-only code.
96
100%
Does it follow best practices?
Impact
96%
1.23xAverage score across 9 eval scenarios
Passed
No known issues
The Readly app has a news feed screen that shows a scrollable list of articles fetched from the backend. The team's backend engineer has exposed a Swift async function that returns an array of Article values — the function simulates real latency by sleeping for a couple of seconds before returning results.
The iOS team needs a FeedViewController that wires this fetch into the UIKit view lifecycle correctly. A recurring complaint from QA is that the app occasionally shows stale data or crashes when a user quickly navigates into and then back out of the feed screen before loading completes. The fix requires the view controller to properly manage the async work: start it when the screen appears, stop it when the user leaves, and make sure the UI is only updated when the data actually arrived for the current session. The implementation should be plain UIKit with Swift Concurrency — no Combine, no DispatchQueue-based workarounds.
The company's minimum deployment target is iOS 15. If any iOS 26-specific concurrency features are used, they must degrade gracefully on older OS versions.
Produce a single Swift source file named FeedViewController.swift that contains:
Article struct or class (with at least id: UUID and title: String fields)fetchArticles() async -> [Article] that simulates a network fetch with an artificial delayFeedViewController: UIViewController subclass that:
UICollectionView or UITableViewUICollectionViewDiffableDataSource or a table view data source as appropriate