This is why I abandoned storyboards and XIBs in iOS development 7-8 years ago. UIKit is actually a pretty decent code-only experience, particularly since the addition of anchor-based autolayout constraint building.
It was actually a major point of frustration that it’s not practical to go code-only with Android Framework on Android and WinUI/Windows App SDK on Windows, both of which are heavily invested in XML layout and resource files. Jetpack Compose thankfully fixes this on Android at least.