我们看看这个每个程序都有的方法吧:
由于iPhone是单窗口程序,所以也就只有这么一个Window对象,而且是UIWindow,不是NSWindow。而根据文档上所说:
“这个是便捷方法,去使被使用对象的主窗口显示到屏幕的最前端。你也可以使用hiddenUIView方法隐藏这个窗口”
所以基本上来说,对于编程者的区别仅仅在于在其前添加代码,或在其后添加代码。
makeKeyAndVisible
Makes the receiver the key window and makes that window visible.
- (void)makeKeyAndVisible
Discussion
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 inheritedhidden UIView property.
Availability
- Available in iPhone OS 2.0 and later.
本文详细介绍了iOS中如何使用makeKeyAndVisible方法使主窗口显示在屏幕最前端,并提供了该方法的基本用法及隐藏窗口的方法。
329

被折叠的 条评论
为什么被折叠?



