UIView doesn’t resize to full screen when hiding the nav bar & tab bar

I had this exact problem where I was animating the tab bar and navigation bar off the bottom and top of the screen respectively, leaving a 49px high white space where the tab bar was.

It turns out that the reason my new “fullscreen” view wasn’t actually filling the space was because I was adding the fullscreen view as a subview of the navigation controller’s view, which itself was a child of the tab bar controller.

To fix it, I simply added the new fullscreen view (in your case the view with all the text) as a subview of the UITabBarController’s view.

[[[self tabBarController] view] addSubview:yourTextView];

Then all you need to do is make sure that your subview’s frame is 480 x 320px and it should fill the screen (including the area that was previously the mysterious white space)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)