Search code examples
iosuistackviewstackview

Stackviews in IB and preview don't look right after changing an inner nested stackview


I almost had a collection of nested stackviews looking good, but wanted to change the distribution of (only) one horizontal stackview nested 3 deep within some other stackviews. In the image below, it is the yellowish strip that is only visible in the Simulator on the right. In xcode IB, without updating the views, the image in the outer most stackview, grew massively to cover the whole screen. In xcode preview, the outer most stackview was still correctly pinned to all edges (as per constraints), but the image had still grown and the stackview that I have changed to fill proportionally had disappeared entirely (it had images and text in it previously in IB). Updating the views in IB changed it to look like the preview. When I ran the simulator, it it looked pretty much right! IB; preview and the Simulator

Why did changing the distribution of an inner stackview to proportional affect make it disappear entirely in IB, thereby affecting all of the other stackview layers outside of it?

And why did fill proportionally make it disappear entirely in IB but not in the simulator?


Solution

  • This has been open for almost two weeks and I have meanwhile seen lots of issues in IB preview suggesting this function is not quite there yet. I guess the only answer to the problem is hope and time.