Objective-c版本: -?(UIViewController?*)appRootViewController
{
????UIViewController?*appRootVC?=?[UIApplication?sharedApplication].keyWindow.rootViewController;
????UIViewController?...
分类:
移动开发 时间:
2014-11-19 02:26:44
阅读次数:
272
1.模态视图的静态工厂方法调用:
+ (void)dismiss
{
UIWindow *window;
window = [UIApplication
sharedApplication].keyWindow;
if([window.rootViewController
isKindOfClass:[ASDepthModal...
分类:
其他好文 时间:
2014-11-07 11:21:19
阅读次数:
159
NSLog(@"------------%@",[[UIApplication sharedApplication].keyWindow performSelector:@selector(recursiveDescription)]);由于recursiveDescription是Apple的私有...
分类:
移动开发 时间:
2014-10-29 19:15:52
阅读次数:
117
转载于 http://www.cnblogs.com/smileEvday/archive/2012/11/16/UIWindow.html 每一个IOS程序都有一个UIWindow,在我们通过模板简历工程的时候,xcode会自动帮我们生成一个window,然后让它变成keyWindow并显示出来....
keyWindow与delegate中Window的区别源码://// ViewController.m// UIWindowRelated//// Created by YouXianMing on 14/10/25.// Copyright (c) 2014年 YouXianMing. ...
UIApplication.sharedApplication().keyWindow.endEditing(true)http://blog.csdn.net/swingpyzf/article/details/17091567
分类:
其他好文 时间:
2014-10-10 15:56:30
阅读次数:
153
方法一:
//1, 关闭键盘
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
如果一个view上好多输入框,我们可以关闭弹出的软键盘要遍历然后调用resignFirstResponder
或者在隐藏键盘的方法中调用 [[[UIApplication
...
分类:
移动开发 时间:
2014-08-21 13:27:44
阅读次数:
170
- (void)show{ if ([UIApplication sharedApplication].keyWindow.rootViewController.navigationController) { [[UIApplication sharedApplication].keyWin...
分类:
其他好文 时间:
2014-08-15 09:27:27
阅读次数:
182
当我们想做一个弹出式菜单时,想将导航栏也一起盖住不显示的话,可以用如下语句实现:UIView* myView = /* 你自定义的view */;UIWindow* currentWindow = [UIApplication sharedApplication].keyWindow;[curren...
分类:
移动开发 时间:
2014-08-11 11:28:52
阅读次数:
1012
1、MBProgressHUD *HUD = [[MBProgressHUD
alloc] initWithWindow:[UIApplication
sharedApplication].keyWindow];
2、MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:[[UIApplication sharedApplication...
分类:
其他好文 时间:
2014-07-22 22:33:54
阅读次数:
202