I have an NSView with a NSTextField in it. The problem is, each time before displaying the view, the size of the NSTextField can change and I want the size of NSView to change with it. So if textfield is 2 lines long, the nsview will be small (just barely surround the textfield) but when its 10 lines long, I don't want the view's size to cut off the textfield, i want the view to grow with it.
How can I do that? Thanks.