Rya*_*zel 4 cocoa objective-c nswindow
当我调用我的[window setFrame:frame animated:YES]来放大窗口时,它工作得很好,但它会动画起来并且它会在状态栏后面.如何让窗口生成动画呢?
ugh*_*fhw 13
只需减小y坐标,增加高度即可.
CGFloat amountToIncreaseWidth = 100, amountToIncreaseHeight = 100;
NSRect oldFrame = [window frame];
oldFrame.size.width += amountToIncreaseWidth;
oldFrame.size.height += amountToIncreaseHeight;
oldFrame.origin.y -= amountToIncreaseHeight;
[window setFrame:oldFrame animated:YES];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4634 次 |
| 最近记录: |