gpt4 book ai didi

cocoa - NSView - 获取 super View 层次结构

转载 作者:行者123 更新时间:2023-12-03 16:17:21 26 4
gpt4 key购买 nike

是否有一种简单的方法可以将 NSView 层次结构(nsview 的 super View 的 super View 的 super View )返回到主窗口或中间的一个点?

谢谢

最佳答案

NSView *aView = myView;
while ((aView = [aView superview])) {
NSLog(@"%@", aView);
}

关于cocoa - NSView - 获取 super View 层次结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8478575/

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