0

我以前是这样做的

[self.navigationController pushViewController:OBJ animated:YES];

但现在我把它换成了

[self.view addSubview:OBJ.view];

所以布局改变了iPhone4 and iPhone5(我只有一个.xib)。如果我使用它工作正常

[self.navigationController pushViewController:OBJ animated:YES]
4

2 回答 2

1

将此代码放在您的OBJ班级

self.view.frame = [UIScreen mainScreen].bounds;
    self.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
于 2013-08-27T06:48:03.313 回答
1

您需要为autoresizingMaskOBJ 类视图的所有子视图进行设置。然后只有它会解决。尝试设置

UIViewAutoresizingFlexibleBottomMargin,
 UIViewAutoresizingFlexibleLeftMargin,
 UIViewAutoresizingFlexibleRightMargin

基于您需要从底部呈现的方式。n

于 2013-08-27T07:49:15.857 回答