-(void)reviewClicked:(id)sender
{
ReviewViewController *newView = [[ReviewViewController alloc] init];
newView.delegate = self;
UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:newView];
[self presentModalViewController:navCon animated:YES];
}
我有一分为二的书记员,这可能造成一些问题。 在详细查看控制器时,我有一顿,在点击上述代码时。
目的是从屏幕底部向上 view一眼,以便用户能够审查他们的选择,然后点击子回到原来的详细观点。 该守则正在发挥作用,你可以在模式观点和原始细节观点之间重新点击。
The problem is, after it slides up the screen, it continues sliding past where it should stop, and finally stops a good 10-15 pixels too far up. Basically, this modal view slides in so far up that a good chunk of the view goes above the top of the screen. Meanwhile, that same amount of space is "empty black space" at the bottom of the screen, just further suggesting that the view just simply moved too far up.
它把问题混在一起,在地貌模式中只字不提。
因此,没有人知道,为什么出现这种 b,使模式观点过于 far,过去是屏幕上的顶端?
-=-=-=-=-=-=-
Edit: Sorry about that, I meant to type navCon in that spot. I fixed it above.
-=-=-=-=-=-=-
解决办法:
-(void)reviewClicked:(id)sender
{
ReviewViewController *newView = [[ReviewViewController alloc] init];
newView.delegate = self;
UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:newView];
navCon.view.frame = CGRectMake(0, 0, 768, 1080);
[self presentModalViewController:navCon animated:YES];
}
在经过一些审判和错误之后,我认识到,我从未实际确定观点的框架! 简单的解决办法...... 我一直通过包括轴心档案在内的实例,由于这些档案自动建立了框架,我完全忽视了这一框架!
想到的是,今后会考虑这一点的人。 这一框架仅用于 por形。 如果你们想要的是地貌模式,那么只相应修改框架:
navCon.view.frame = CGRectMake(0, 0, 1080, 768);