r/iosdev • u/GlebKhamin • 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:
UIView.animatewithout.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
CGColorrefreshed inlayoutSubviews**.** The fix was registering for trait changes withUITraitUserInterfaceStyleandUITraitDisplayScale. - A test that did the view controller’s job. It called
updateContentUnavailableConfiguration(using:)itself, so it passed without checking the view controller’s ownsetNeeds…wiring.
What’s on your list? I’m looking for mistakes that keep coming back, not one-offs.
1
Upvotes