Xcode 12 Unable to use Interface Builder to add subview to scrollview Xcode 12 Unable to use Interface Builder to add subview to scrollview xcode xcode

Xcode 12 Unable to use Interface Builder to add subview to scrollview


I have the same issue on Xcode 12.0.1. As a workaround you can start by setting up the root view of your scroll view content, select it and use the Editor / Embed in / Scroll View command (or alternatively, the last bottom right icon in the canvas). Then you can add to the root content view normally by drag & dropping.


I've wasted more time than I'd like to admit on this one.You should drag directly into the drawing canvas,not into the view hierarchy inspector.


While embedding is not available i use this trick:

  1. Remove Safe area Layout guide and Safe area Relative margins from parent view
  2. Add your desired subview
  3. Return back all safe area settings