Search code examples
swiftmacoscocoanstextfield

how to set textfield size fix macos swift


I have one textfield "A" with width 150. but whenever I am passing more characters to textfield "A", it is getting overlapped on other textfield "B" characters.

I want textfield "A" to be fixed size and scrollable(mostly right and left).

Thanks in advance.


Solution

  • You should use Auto-Layeout in your storybook. Set fixed width, trailing space and leading space to your text field.