1

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];

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];
    }
}

私のビューのスクリーンショットは次のとおりです。

ここに画像の説明を入力してください

そのため、ビューコントローラが横向きモードから縦向きモードに移動していますが、ステータスバーが横向きモードから縦向きモードに移動していません。

私にあなたの考えを共有してください。

4

0 に答える 0