【问题标题】:autoresizingmask for height and width高度和宽度的自动调整掩码
【发布时间】:2012-02-20 19:52:23
【问题描述】:

我在 xcode 4.4 中使用 cocoa,我有一个窗口,其中包含从 xib 文件加载的视图。我在其中创建了另一个视图,每当我将窗口设为全屏时,我想调整其大小以填充外部视图。

我尝试过使用:

[self setAutoresizingMask:NSViewWidthSizable];

[self setAutoresizingMask:NSViewHeightSizable];

它们可以工作,但显然这只会在一个方向上调整视图大小。有没有办法两者兼得?

提前致谢, 本

【问题讨论】:

    标签: cocoa height width autoresizingmask


    【解决方案1】:
    [self setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
    

    【讨论】:

      猜你喜欢
      • 2013-09-05
      • 1970-01-01
      • 2015-03-27
      • 1970-01-01
      • 2018-10-30
      • 2013-02-07
      • 1970-01-01
      • 2016-08-01
      • 1970-01-01
      相关资源
      最近更新 更多