Apple Developer Documentation

문자열 줄바꿈 모드

Apple Developer Documentation

recordModalLabel.lineBreakMode = .byCharWrapping

단어 기반, 문자 기반 등으로 개행의 위치를 변경시킬 수 있다.

uilabel dynamic height

recordModalLabel.text = text
recordModalLabel.preferredMaxLayoutWidth = recordModalLabel.frame.size.width
recordModalLabel.invalidateIntrinsicContentSize()
recordModalLabel.frame.size.height = recordModalLabel.intrinsicContentSize.height

https://stackoverflow.com/questions/446405/adjust-uilabel-height-depending-on-the-text

&ref

Dynamic UILabel | https://jayeshkawli.ghost.io/using-autolayout-to-dynamically-resize-uilabel/