Is there any way I get get the size of an NSWindow (in pixels) and display it? So when the person resizes the window the text will change and display the new size.
4 Answers
12
votes
3
votes
0
votes
Instead of attempting to handle resizes, you should instead make sure your views' autoresizing masks are set correctly. In Interface Builder, you do this on the Size inspector (⌘3) with the views selected.
If you've lain out an entire view hierarchy without setting their autoresizing masks, you have a bit of tedium ahead of you, but it's not hard (just tedious), and won't take very long. This is why you should do set views' autoresizing masks as you create them.
Once the autoresizing masks are set, the views will resize themselves automatically; unless your interface is very complicated, or any views can go down to zero size, you won't need to intervene.