小米双卡一张卡无信号的那个双卡信号图标为什么有些堆叠显示

iOS 获取当前正在显示的ViewController
引子 在做 iOS 开发时,我们经常在一个 ViewController 中 presentModelViewController 另外一个 ViewController。看似简单,但在与 UIActionSheet 和 UIAlertView 结合起来使用时,很容易出现问题。问题如下: /questions/
在做 iOS 开发时,我们经常在一个 ViewController 中 presentModelViewController 另外一个 ViewController。看似简单,但在与 UIActionSheet 和 UIAlertView 结合起来使用时,很容易出现问题。问题如下: /questions//warning-attempt-to-present-uimodalitemspresentingviewcontroller-on-uimodalitema
"Warning: Attempt to present `&_UIModalItemsPresentingViewController:&
&_UIModalItemAppViewController:& which is already presenting
&_UIModalItemsPresentingViewController:&"`
类似的问题是因为 UIAlertView 或 UIActionSheet 在系统级使用了 presentModelViewController,并且修改了 Application 中更换了 keyWindow,在 keyWindow 的 rootViewController 中 presentModelViewController,如果当前 present 还未完成时,再 present 别的界面,就会报这个错。
在 present 时,不直接使用 keyWindow,使用如下代码:
//获取当前屏幕显示的viewcontroller
- (UIViewController *)getCurrentVC
UIViewController *result =
UIWindow * window = [[UIApplication sharedApplication] keyWindow];
if (window.windowLevel != UIWindowLevelNormal)
NSArray *windows = [[UIApplication sharedApplication] windows];
for(UIWindow * tmpWin in windows)
if (tmpWin.windowLevel == UIWindowLevelNormal)
window = tmpW
UIView *frontView = [[window subviews] objectAtIndex:0];
id nextResponder = [frontView nextResponder];
if ([nextResponder isKindOfClass:[UIViewController class]])
result = nextR
result = window.rootViewC
查看更多:http://blog.csdn.net/worldzhy/article/details/
你最喜欢的The page is temporarily unavailable
nginx error!
The page you are looking for is temporarily unavailable.
Please try again later.
Website Administrator
Something has triggered an error on your
This is the default error page for
nginx that is distributed with
It is located
/usr/share/nginx/html/50x.html
You should customize this error page for your own
site or edit the error_page directive in
the nginx configuration file
/etc/nginx/nginx.conf.主题 : 为什么我presentViewController打开的页面是一片黑色看不到任何东西
级别: 骑士
UID: 226905
可可豆: 851 CB
威望: 710 点
在线时间: 835(时)
发自: Web Page
来源于&&分类
为什么我presentViewController打开的页面是一片黑色看不到任何东西&&&
新手提问,见谅了哈我storyboard 中有两个ViewController 一个是原有的默认ViewController ,一个是我新建的SecondViewController ,两个页面都有一个按钮,我在原有的ViewController中点击按钮然后使用presentViewController 跳转到 SecondViewController (在.m文件中实现的跳转方法),SecondViewController 是和我新建的类连接的,但是跳转后 SecondViewController 一片黑色什么东西都看不到是怎么回事呢?用[self.storyboard instantiateViewControllerWithIdentifier:@&&];方法就可以看见页面的东西。求各位前辈帮帮忙
发帖: 1072
可可豆: 124080 CB
威望: 126081 点
在线时间: 2548(时)
发自: Web Page
可能是stryBoard加载的问题。。&&&&UIStoryboard *stryBoard=[UIStoryboard storyboardWithName:@&Main& bundle:nil];&&&&ViewControllerA *_ViewControllerA = [stryBoard instantiateViewControllerWithIdentifier:@&ViewControllerA&];&&&&_ViewControllerA.delegate =&&&&[[self navigationController] pushViewController:_ViewControllerA animated:YES];&&&&_ViewControllerA =
图文唐诗三百首,图文国学合集汉语词典速查版:最新现代汉语词典 新华字典 成语词典大全-中文好助手
级别: 骑士
可可豆: 763 CB
威望: 763 点
在线时间: 1374(时)
发自: Web Page
可以在SecondViewController 里加点控件来做下测试
有志者,事竟成;破釜沉舟,百二秦关终归楚; 苦心人,天不负;卧薪尝胆,三千越甲可吞吴。
关注本帖(如果有新回复会站内信通知您)
苹果公司现任CEO是谁?2字 正确答案:库克
发帖、回帖都会得到可观的积分奖励。
按"Ctrl+Enter"直接提交
关注CocoaChina
关注微信 每日推荐
扫一扫 浏览移动版你正在使用的浏览器版本过低,将不能正常浏览和使用知乎。

我要回帖

更多关于 任务栏图标堆叠 的文章

 

随机推荐