gpt4 book ai didi

cocoa - setContentBorderThickness :forEdge: not actually setting the value 的问题

转载 作者:行者123 更新时间:2023-12-03 18:05:09 24 4
gpt4 key购买 nike

我正在尝试使用 setContentBorderThickness:forEdge: 在 Cocoa 应用程序中创建底部栏。

mipadi 发现了一些问题,但在测试过程中,我认为这可能是一个稍微不同的问题:

-(void) adjustContentBorderBasedOnArrayControllerSelection{
if(([[self.resultsArrayController selectionIndexes] count] == 0)){
[[self window] setContentBorderThickness:40.0f forEdge:CGRectMinYEdge];
NSLog(@"%f", [[self window] contentBorderThicknessForEdge:CGRectMinYEdge]);
} else {
[[self window] setContentBorderThickness:60.0f forEdge:CGRectMinYEdge];
NSLog(@"%f", [[self window] contentBorderThicknessForEdge:CGRectMinYEdge]);
}
}

这两个 NSLog() 消息显示厚度值为 0.0,即使在我明确设置它之后也是如此。有人知道这是怎么回事吗?

最佳答案

您可以使用CGRectMinYEdge 。 (在 64 位系统上,NSMinYEdge 无论如何都会被 #define 转换为 CGRectMinYEdge)。

关于cocoa - setContentBorderThickness :forEdge: not actually setting the value 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3048074/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com