1

Hello I was wondering if anyone knew of a method or way that you stop the user resizing your window for a Cocoa / Mac OS X application.

If this is not not possible how would you go about resizing the window uniformally.

Kjuly
  • 34,476
  • 22
  • 104
  • 118
AlanF
  • 1,591
  • 3
  • 14
  • 20

1 Answers1

2

Set the min and max sizes to the desired size.

CGSize fixedSize = myWindow.frame.size;
[myWindow setMinSize:fixedSize];
[myWindow setMaxSize:fixedSize];
DrummerB
  • 39,814
  • 12
  • 105
  • 142
  • thanks for the help, appreciate it, just trying to get used to all this Xcode and objective c syntax – AlanF Oct 19 '12 at 20:31
  • 1
    You're welcome. Btw, Xcode is an [IDE](http://www.google.ch/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CB8QFjAA&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIntegrated_development_environment&ei=d7uBUOqhMsXHsgas4oGABA&usg=AFQjCNGzsgW3CZUA74q_DmV7NnnkIxNZIw&sig2=QMHp1Z57YAqjvECyoc5xaw), Objective-C is a language and Cocoa is an [API](http://www.google.ch/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCAQFjAA&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FApplication_programming_interface&ei=ibuBUIraLJDbsgbToIGQDg&usg=AFQjCNH_lcIv3goY6Ab6BeZ2HU9NfoE81g&sig2=3nb4bC0zw0SfModIMVibjw). – DrummerB Oct 19 '12 at 20:44