2014-01-27 43 views
0

enter image description here为什么用ios7我的stackViewController把这个白线?

为什么左下角有这个空白?这是不是在ios6编译版本,我不明白如何删除它。我的笔尖文件没有它(顶级视图是大的,因为你看到(从图像左20像素)和控制器方面没有任何视图的尺寸

编辑:我已经试过把C_X解决方案上的代码:?

[super viewDidLoad]; 


self.view.backgroundColor = [NVGlobals homeCellBackgroundColor]; 
// on the iPad, disable panning (because we're inside a stacked 
// view controller 
if (IS_IPAD) { 
    self.edgesForExtendedLayout=UIRectEdgeNone; 
    self.panEnabled = YES; 

} 

,但它不工作的任何想法

编辑:问题就迎刃而解了:我使用了一个名为PSStackedView(https://github.com/steipete/PSStackedView/),并正确地使用它iOS7插件您必须更改viewRect而不是应用程序:

- (CGRect)viewRect { 
// self.view.frame not used, it's wrong in viewWillAppear 
CGRect viewRect = [[UIScreen mainScreen] bounds]; 
return viewRect; 

}

+0

它是iOS 7中状态栏的问题,所以你需要在iOS 7中管理它。有很多方法,但你也可以给顶视图*('self.view')* ** ** **像素。 – iPatel

+0

没有人可以帮助我吗? –

+0

在你的navCon的rootViewCon .. self.navigationController.view.frame = CGRectMake(0,20,320,548); – iPatel

回答

0

这是因为在iOS中,我们延伸的边缘,你可以将其设置为UIRectEdgeNone。

self.edgesForExtendedLayout=UIRectEdgeNone; 

然后你的视图不会在状态栏下向上移动。

+0

@Alessio Crestani:这是可用的ios7和更高版本。如果你的应用支持ios检查,你应该检查IOS版本并使用。 – jailani

+0

我有写它在顶层的viewDidLoad?因为它不起作用。 –

+0

@C_X我正在将我的应用程序转换为ios7 –

相关问题