无法管理20个像素空间的状态栏

时间:2012-10-15 11:04:18

标签: iphone objective-c uistatusbar

我在pop视图中打开我的viewcontroller,它只包含UITableView。此视图以横向模式打开。编码如下:

OilChangeView *oilVC = [[OilChangeView alloc] initWithNibName:@"OilChangeView" bundle:nil];

       popView = [[UIPopoverController alloc] initWithContentViewController:oilVC];

        [popView setPopoverContentSize:CGSizeMake(480, 200)];
        [popView presentPopoverFromRect:btnOilChange.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];

on didSelectRowAtIndexPath我将打开另一个处于纵向模式的视图,但此时状态栏不会从横向模式移动到纵向模式,这就是为什么当我打开新的视图控制器时,20像素的空间仍然是白色背景的原因。它的编码如下:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if(indexPath.row == 0)
    {
        ConventionalMotorOil *conventional = [[ConventionalMotorOil alloc] initWithNibName:@"ConventionalMotorOil" bundle:nil];
        [self presentModalViewController:conventional animated:YES];
    }
}

我的观点截图如下:

enter image description here

所以我的viewcontroller从横向模式移动到纵向模式,但我的状态栏没有从横向模式移动到纵向模式。

与我分享您的想法。

0 个答案:

没有答案