Search code examples
autolayoutstoryboarduikit

Escaping StackView after making 0 linebreak in label


I'm trying to add a label to StackView, but the text in label is too big to display it. So I'm setting lines to 0 and after that my StackView escapes. I've set top, leading and trailing constraints for main StackView. Does anybody know how to fix this problem ? enter image description here

enter image description here

It must be like this enter image description here But when I'm changing linebreak to 0 it become like on 2 screenshot


Solution

  • The problem was that I used the version of XCode 9.1, which had this bug in it and did not test the application on the simulator. Upgrading to a newer version solved this problem.