ViewDidAppear's height is 656 in iPhone 5

I get a height of 656 in my viewDidAppear on the view controller. This is not the correct height I expect from the iPhone 5. Any idea why this could happen? I have a UIView that I added as a subtask of this UIViewController, and I set the spacers so that it is always at the bottom of the UIViewController. However, since the height is 656, I can no longer see this UIView. Any idea why?

Here is my code:

- (void) viewDidAppear:(BOOL) animated { [super viewDidAppear:animated]; NSLog(@"%f", self.view.bounds.size.height); } 

This is how I initialize VC:

  SavedViewController *savedStoriesVC = [[SavedViewController alloc] initWithNibName:@"SavedViewController" bundle:nil]; savedStoriesVC.managedObjectContext = managedObjectContext; savedStoriesVC.delegate = self; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:savedStoriesVC]; navController.navigationBarHidden = YES; 

enter image description hereenter image description here

+4
source share
1 answer

I had the same problem. I was able to β€œfix” it by disconnecting all struts and springs. But then, of course, the rotation did not work.

0
source

Source: https://habr.com/ru/post/1438520/