makeKeyAndVisible & makeKeyWindow - iPhone 中的 uiwindow

发布于 2024-08-06 21:47:09 字数 80 浏览 12 评论 0原文

在每个应用程序中,

总是写成[window makeKeyAndVisible];

makeKey 是什么意思?

In every application,

there is always written as [window makeKeyAndVisible];

What is mean by makeKey?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

将军与妓 2024-08-13 21:47:09

The key window is the window which will receive user interaction.

You might take a look at this:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html

初心未许 2024-08-13 21:47:09

这意味着这是接受键盘输入的窗口。这与 Mac OS X 上的类似命名法相匹配。

This means that this is the window that accepts keyboard input. This matches similar nomenclature on Mac OS X.

漫雪独思 2024-08-13 21:47:09

该方法调用执行关键功能。如果省略它,则窗口的顶层视图将不会自动调整大小,但您已经设置了弹簧和支柱。我花了一段时间才弄清楚:如果通话中状态栏大小没有调整,请检查窗口是否被标记为关键。

This method call performs a critical function. If you omit it then the top level view to the window will not be autoresized however you have set the springs and struts. Took me a while to figure that out: if the in-call status bar resizing is not happening, check to see that the window is marked as key.

夜灵血窟げ 2024-08-13 21:47:09

使接收器成为关键窗口并使该窗口可见。

这是使接收器成为主窗口并将其显示在其他窗口前面的便捷方法。您还可以使用 UIView 继承的隐藏属性来隐藏和显示窗口。

来源http ://developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html

Makes the receiver the key window and makes that window visible.

This is a convenience method to make the receiver the main window and displays it in front of other windows. You can also hide and reveal a window using the inherited hidden property of UIView.

source: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文