-[NSTextField intrinsicContentSize] always has undefined width

后端 未结 2 1779
面向向阳花
面向向阳花 2021-01-18 06:54

I\'m pulling hairs here. I have an NSTextField created on a xib that has an intrinsicContentSize adjusted to it\'s stringValue.

If I create a textField programmatica

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-18 07:32

    If you do need an editable textfield, make sure the NSTextField has a width constraint set to the minimum width the view should be.

提交回复
热议问题