I checked the other answers, but did not find anything that really describes my situation. So here.
I have a windowed application that creates and loads a UIViewController from xib. It has a status bar disabled, height 480, and UISegmentedControl with a y origin of 451. It displays well at the bottom of the screen. *
In the viewDidLoad of the UIViewController, I create a UIView initWithFrame:CGRectMake(0.0, 0.0, 320.0, 431.0)];(these are 480 - 29 pixels for the UISegmentedControl and 20 for the status bar.) I am adding it to the UIViewController with [self.view addSubview:gameBoard];. Then some parts of the UIView game are added as subtasks of the UIView playing field, and everything is displayed, as I think it should be.
When some of these UIView views are connected, a menu should appear. I created a UIViewController with the necessary controls. I use the delegate method to call from subzones that pick up triggering events to the root UIViewController that executes
self.squadOrders = [[SquadOrders alloc] initWithNibName:@"SquadOrders" bundle:nil];
squadOrders.viewControllerDelegate = self;
[self presentModalViewController:squadOrders animated:YES];
And the modal dialog box displays, I think, it should slide up from the bottom of the screen, not closing the status bar, but covering the UISegmentedControl mentioned at the bottom of the root UIViewController. He deviates
[self dismissModalViewControllerAnimated:YES]
and that where the problem begins. The UISegmented control moves down 20 pixels, so only 9 pixels are displayed at the bottom of the screen. At the top of the screen there is a 20-pixel white gap in which the image is moved down.
* xib .
stackoverflow :
IPhone - Modal View Controller - - , , , - , UIViews. , , .
UIScrollView ModalViewController - - , , . , reset, .
, .