I'm following the official iOS app development guide. In "Implement a Custom Control" section, after completing "Add Support for Interface Builder" sub-section and re-building the project, I am still getting layout errors in the Interface Builder:
What is the reason for this error and how can I fix this?
The reason is that your outer stack view's "Alignment" property is set to "Fill", whereas it should be set to "Leading". In other words, set the "Alignment" property of your outer stack view to "Leading" in order to fix this problem.
The problem is, the guide never mentions about this explicitly. In "Build a Basic UI" section, there is this image:
that shows the "Alignment" property of the outer stack view as "Leading". However, it is never explicitly mentioned that the "Alignment" property of the outer stack view should be set to "Leading", instead of "Fill".