我正在尝试使用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。有谁知道这是怎么回事?