Iphone 我看到子视图底部有一个间隙

Iphone 我看到子视图底部有一个间隙,iphone,uiview,interface-builder,Iphone,Uiview,Interface Builder,基本上,第二个视图应该是从顶部开始的20px 我看到子视图底部有一个间隙,我可以看到第一个视图的底部 有没有什么方法可以设置边距或边界,这样视图可以向下移动20像素,这样就可以进行修复 -(void)goTo2{ //calling the .xib file and the SettingsViewController SettingsViewController *aSettingsView = [[SettingsViewController alloc] initWit

基本上,第二个视图应该是从顶部开始的20px

我看到子视图底部有一个间隙,我可以看到第一个视图的底部

有没有什么方法可以设置边距或边界,这样视图可以向下移动20像素,这样就可以进行修复

-(void)goTo2{

    //calling the .xib file and the SettingsViewController
    SettingsViewController *aSettingsView = [[SettingsViewController alloc] initWithNibName:@"Settings" bundle:nil];
    [self setSettingsViewController:aSettingsView];
    [aSettingsView release];

    [self.window addSubview:[settingsViewController view]];
    //moving the view 30px down
    [[settingsViewController view] setFrame:CGRectMake(0, 20, 320, 460)];

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.0];
    //setting the animation
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:window cache:YES];

    [UIView commitAnimations];  
    [settingsViewController release];
    settingsViewController = nil;
}

20px间隙与状态栏的高度相同。你试过[uu uuu_uu_uu;setFrame:CGRectMake0,0,,]吗?这是我在代码中放的东西,动画正在提交,它可以工作,但是现在,正常视图显示高出30px,然后下降30px。在显示视图之前,我应该将要设置的边界的代码放在哪里,这样用户就看不到视图正在向下移动[[settingsViewController视图]setBounds:CGRectMake0,-30,320,480];能否提供显示此视图所用的代码?我认为如果我们不知道你是如何表达观点的,我们就无法回答你的问题。