NSControl 들은 NSView 를 상속받기 때문에 NSView 에 있는 함수를 이용해 주면 된다.
Creating Instances 에 보면
단순히 크기 변경이나 위치 이동을 할 경우 Modifying the Frame Rectangle 를 보면 된다.
frame 를 이용해 rect를 얻은 다음 원하는 만큼 수정해서 적용해 주면 된다.
[ reference ]
// Foundation Data Types Reference
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html
// NSView Class Refrence
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html
Creating Instances 에 보면
- (id) initWithFrame:(NSRect)frameRect가 있는데 사각 박스와 함께 설정이 가능하다.
단순히 크기 변경이나 위치 이동을 할 경우 Modifying the Frame Rectangle 를 보면 된다.
- (void)setFrame:(NSRect)frameRect - (NSRect)frame - (void)setFrameOrigin:(NSPoint)newOrigin - (void)setFrameSize:(NSSize)newSize - (void)setFrameRotation:(CGFloat)angel - (CGFloat)frameRotation
frame 를 이용해 rect를 얻은 다음 원하는 만큼 수정해서 적용해 주면 된다.
[ reference ]
// Foundation Data Types Reference
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html
// NSView Class Refrence
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html