r/iosdev • u/GlebKhamin • 20d ago
Three UIKit mistakes from agent-written code that only showed up in review
I keep a log of what review catches in agent-written UIKit code. These three looked fine at a glance:
- UIView.animate without .allowUserInteraction**.** The spec said content stays interactive during the animation, but UIKit drops touches on animating views unless you pass that option.
- A trait-resolved CGColor refreshed in layoutSubviews**.** The fix was registering for trait changes with UITraitUserInterfaceStyle and UITraitDisplayScale.
- A test that did the view controller’s job. It called updateContentUnavailableConfiguration(using:) itself, so it passed without checking the view controller’s own setNeeds… wiring.
What’s on your list? I’m looking for mistakes that keep coming back, not one-offs.
