iPhone-ModalViewController没有上升到屏幕顶部 [英] iPhone - ModalViewController not raising to top of the screen

查看:81
本文介绍了iPhone-ModalViewController没有上升到屏幕顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示的UIImagePickerController

I have a UIImagePickerController that is shown

[self presentModalViewController:self.picker animated:NO];

然后在代码后面,我允许用户显示首选项面板:

Then later on the code, I allow the user to display a preference panel :

PreferencesController *nextWindow = [[[PreferencesController alloc] initWithNibName:@"Preferences" bundle:nil] autorelease];
UINavigationController* navController = [[[UINavigationController alloc] initWithRootViewController:nextWindow] autorelease];
[self presentModalViewController:navController animated:YES];

这时,新的控制器将在屏幕上显示,但不要转到顶部. 在顶部(我可以看到相机视图的后面)留有一些空间透明",而视图的底部隐藏在屏幕之外.我所谈论的空间是关于状态栏的高度.屏幕上不显示状态栏.

At this point, the new controller raises on the screen, but don't go to the top. Some space is left "transparent" at the top (I can see the camera view behind), and the bottom of the view is hidden out of the screen. The space I am talking about is about a status bar height. The status bar is not present on the screen.

导航控制器处于隐藏状态:

The navigation controller is hidden :

self.navigationController.navigationBarHidden = YES;

视图顶部有一个工具栏.没什么特别的. 视图的高度定义为480.所有模拟元素均在IB中设置. autoresize属性均已设置.

There is a toolbar at the top of the view. Nothing special into the view. The height of the view is defined at 480. All simulated element are set off in IB. The autoresize properties are all set on.

我以前使用过xib(我从头开始对其进行了重建),效果很好.我看不到我错过的内容(我只更改了xib,代替了前一个).

I had a previous xib (I rebuilt it from scratch) that worked very well. I don't see what I missed on this one (I have only changed the xib, that replaces the previous one).

我已经清理了缓存以确保没有剩余.没变化... 我已经删除了新视图中的所有内容,以防止发生一些冲突.没变化...

I've cleaned the cache to be sure there was nothing left. No change... I've deleted everything in the new view to prevent some conflicts. No change...

我想念什么?我如何删除这个空白空间?

What did I miss ? How could I remove this empty space ?

推荐答案

在进行了一些搜索和其他一些问题之后,我已经通过

After some searches and some other problems, I've found a final solution to the problem through this question

我不得不打电话给

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

在应用程序启动时.

这篇关于iPhone-ModalViewController没有上升到屏幕顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆