1

I am opening my viewcontroller in pop view which contains only UITableView. This view opens in landscape mode. coding of it is as follows:

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 I am going to open another view which is in portrait mode but at that time status bar does not move from landscape mode to portrait mode that's why the space of 20 pixels remains with white background when I open new view controller. The coding of it is as follows:

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

The screenshot of my view is as follows:

enter image description here

so my viewcontroller is moving from landscape mode to portrait mode but my status bar is not moving from landscape mode to portrait mode.

share me your ideas.

iPhone
  • 4,092
  • 3
  • 34
  • 58

0 Answers0