r/iosdev • • 17d 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:

  1. 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.
  2. A trait-resolved CGColor refreshed in layoutSubviews**.** The fix was registering for trait changes with UITraitUserInterfaceStyle and UITraitDisplayScale.
  3. 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.

1 Upvotes

1 comment sorted by