我以前是这样做的
[self.navigationController pushViewController:OBJ animated:YES];
但现在我把它换成了
[self.view addSubview:OBJ.view];
所以布局改变了iPhone4 and iPhone5
(我只有一个.xib
)。如果我使用它工作正常
[self.navigationController pushViewController:OBJ animated:YES]
我以前是这样做的
[self.navigationController pushViewController:OBJ animated:YES];
但现在我把它换成了
[self.view addSubview:OBJ.view];
所以布局改变了iPhone4 and iPhone5
(我只有一个.xib
)。如果我使用它工作正常
[self.navigationController pushViewController:OBJ animated:YES]
将此代码放在您的OBJ
班级
self.view.frame = [UIScreen mainScreen].bounds;
self.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
您需要为autoresizingMask
OBJ 类视图的所有子视图进行设置。然后只有它会解决。尝试设置
UIViewAutoresizingFlexibleBottomMargin,
UIViewAutoresizingFlexibleLeftMargin,
UIViewAutoresizingFlexibleRightMargin
基于您需要从底部呈现的方式。n