setAutoresizingMask从osx中的代码 [英] setAutoresizingMask from code in osx
问题描述
在尺寸检查器中有一个名为Atosizing的部分,可以设置控件的左,右,上,下布局,我发现我用 setAutoresizingMask
不知道如何设置它,我的控制布局向右和向上(意味着当用户调整大小窗口我的控制牛排向右和向上)
查看这些 -setAutoresizingMask
参数:
strong> NSViewNotSizable
接收者无法调整大小。
NSViewMinXMargin
接收者及其superview之间的左边距是灵活的。
NSViewWidthSizable
接收器的宽度是灵活的。
NSViewMaxXMargin
接收器与其superview之间的右边距是灵活的。
NSViewMinYMargin
接收器与其
NSViewHeightSizable
NSViewMaxYMargin
<
因此,您可以它就像这样:
[YourOutlet setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
There is a section in size inspector with name Atosizing that can set left,right,up,down layout of a control,i find that i do that with setAutoresizingMask
but don't know how set it that my control layout to right and up (means when user resize window my control steak to right and up)
Look at these -setAutoresizingMask
parameters:
NSViewNotSizable
The receiver cannot be resized.
NSViewMinXMargin
The left margin between the receiver and its superview is flexible.
NSViewWidthSizable
The receiver’s width is flexible.
NSViewMaxXMargin
The right margin between the receiver and its superview is flexible.
NSViewMinYMargin
The bottom margin between the receiver and its superview is flexible.
NSViewHeightSizable
The receiver’s height is flexible.
NSViewMaxYMargin
The top margin between the receiver and its superview is flexible.
So You can do it like this:
[YourOutlet setAutoresizingMask: NSViewMinXMargin | NSViewMinYMargin];
这篇关于setAutoresizingMask从osx中的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!