A: 

Add the extra amt of space to the dimension of the view, so if it was rectangle CGRectMake(0,0,320,460) make it CGRectMake(0,0,320,480)... This has happened to me, Im n ot exactly sure why, it might ahve to do with the underlying view you are putting your text view on top off, but just adding the dimension should do it

Daniel
this did not have any effect.
Ben Scheirman
A: 

If you are using Interface Builder, ensure autoresizing is set properly in the Size Inspector. If you creating the UITextView in code, make sure you set the frame to be large enough and that the view's parent (and it's parent) are also large enough. For simplicity, add the view to the window directly, and then move inward from there.

To move a view to its superview:

- (void)moveViewToSuperview:(UIView *)view
{
    UIView *newSuperview = [[view superview] superview];
    [view removeFromSuperview];
    [newSuperview addSubview:view];
    [newSuperview bringSubviewToFront:view];
}
rpetrich
Auto-size is W+H.textView.frame = CGRectMake(0,0, 320, 700); seems to have no effect on it.
Ben Scheirman
If I remove the textview from the view and then add it directly to the window then it goes full screen. This has weird auto-rotate effects though, so I can't leave it this way. It does seem to indicate that something is occluding the text view.
Ben Scheirman
Try this: Return your UITextView to its original location in Interface Builder. Add a call to moveViewToSuperview:myTextView just after the view becomes visible run your application. Test to see if it's obscured. If not, add another call and debug again. Rinse repeat. That should help you figure out "how many levels out" the view that's blocking the text view is.
rpetrich
A: 

Maybe there's another view that is a built-in part of the tab bar area? That is to say, something additional to hide. This will help you see what views are around.

for (UIView *viewy in [self.navigationController.view subviews])
{
 NSLog([viewy description]);
}
ojreadmore
The views:<UINavigationTransitionView: 0xd2c6f0; frame = (0 0; 320 431); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xd2bf90>><UINavigationBar: 0xd1f010; frame = (0 20; 320 44); clipsToBounds = YES; opaque = NO; autoresize = W; layer = <CALayer: 0xd1f060>><UITransitionView: 0xd19050; frame = (0 0; 320 431); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xd18a80>><UITabBar: 0xd1f980; frame = (0 431; 320 49); autoresize = W+TM; layer = <CALayer: 0xd1f520>>(this shows both navigationController subviews and tabBarController subviews)
Ben Scheirman
Ben Scheirman
+1  A: 

I believe the issue is that you're still in the tab bar controller, I've hit a few issues with this as well, and ended up creating two views for my app delegate to control, the tab bar controller , and a separate uiview that holds anything that the tab bar controller tries to take command of. You could pass your view to the app delegate and use it there perhaps?

James Hall
I'm not sure I follow... are you saying that when I go fullscreen to use a different view altogether? I tried adding the view directly to the UIWindow, and it looks good, but the experience is rather quirky when you rotate. I'm not sure I want to go this route.
Ben Scheirman
+1  A: 

Try making the TabBarControllers view larger than the screen so that the tab bar is hidden off screen, as long as you do this before the new ViewController is set, then its view will resize to fill the new frame!

In my test I used the tabBarController:shouldSelectViewController: delegate method to check which view controller is about to become current and set the TabBarController.view.frame accordingly. For example:

- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
{
    if( viewController == second)
     tabBarController.view.frame = CGRectMake( 0, 20, 320, 500);
    else
     tabBarController.view.frame = CGRectMake( 0, 20, 320, 460);
}

If this still isn't quite what you need, try looking into the hidesBottomBarWhenPushed property of UIViewController. When set to yes this will make the bottom bar hide if the Controller is pushed onto a Navigation stack.

+1  A: 

I would move the view to the window when you choose to go fullscreen. e.g.

myView = [self.view retain];
self.view = nil;
[window addSubview:myView];

and to go back:

[myView removeFromSuperView];
self.view = myView;
[myView release];
myView = nil;

By adding the view as a child of the window, it can be totally fullscreen and will be on top of the tab bar.

You can then combine this with

[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];

to detect rotation. (I think that you combine this with view.transform = CGAffineTransformMakeRotation to make it rotate...?)

Benjie Gillam
any tips on getting rotation to work when I do this? It doesn't seem to call my shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation method if I do this.
Ben Scheirman
You can use the current solution combined with: [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];to detect rotation. (I think that you combine this with view.transform = CGAffineTransformMakeRotation to make it rotate...?)You could call your shouldAutorotateToInterface... function from the didRotate: function to see if you should do it, too.
Benjie Gillam
I've edited my answer to add in the rough rotation solution.
Benjie Gillam
I'll try this when I get home...
Ben Scheirman
+1  A: 

Have you set your view controller's hidesBottomBarWhenPushed property to YES? You need to set this in your initWithNibName:bundle: or initWithCoder: method. When it gets pushed to the nav controller, this should hide the tab bar and make the content view extend down to the bottom.

Daniel Dickison
Ben Scheirman
A: 

Have you attempted to force the text to "re-write" itself (resetting the .text property of whatever object you're using)? I have had many instances where views simply do not re-check or repaint their data, and forcing seems to be the only fix. If this is not good from a user experience standpoint, you might try making the nav/tabbars transparent after the user touches, and before they disappear. This normally extends the view to the full size of the screen.

TahoeWolverine
Ben Scheirman
+2  A: 

You can definitely make something that appears correct by shifting the frame of the view such that the tab bar is off screen. I know someone else mentioned trying that, and you said it didn't work, but I suspect the issue is that you did not have the textviews resize mask setup properly when you tried. Below is code that should work:

- (void)viewDidLoad {
  [super viewDidLoad];
  currentlyHidden = NO;
}

- (void) hideStuff {
  SO2AppDelegate *appDelegate = (id)[[UIApplication sharedApplication] delegate];
  self.navigationController.navigationBarHidden = YES;

  CGRect newFrame = appDelegate.tabBarController.view.frame;
  newFrame.size.height += appDelegate.tabBarController.tabBar.frame.size.height;
  appDelegate.tabBarController.view.frame = newFrame;
}

- (void) showStuff {
  SO2AppDelegate *appDelegate = (id)[[UIApplication sharedApplication] delegate];

  CGRect newFrame = appDelegate.tabBarController.view.frame;
  newFrame.size.height -= appDelegate.tabBarController.tabBar.frame.size.height;
  appDelegate.tabBarController.view.frame = newFrame;

  self.navigationController.navigationBarHidden = NO;
}

- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {  
  if (currentlyHidden) {
    [self showStuff];
    currentlyHidden = NO;
  } else {
    [self hideStuff];
    currentlyHidden = YES;
  }
}

Additionally, since this is definitely sensitive to how you have your nibs etc setup, I am posting a a project online so you can download it and get a look at it. It is a pretty minimal demo, just a Navigation based project where the delegate sets up a tab controller and embeds the view controller from the main nib. The rest is in the RootViewController nib and class. The bars are toggled whenever a touch begins, so just tap the screen. Obviously in a real app you might need to adjust the scroll view so stuff the content doesn't appear to jump.

Louis Gerbarg
awesome, I will try this tonight.
Ben Scheirman
Ben Scheirman
+5  A: 

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)

Harry
this sort of worked, but I found no easy way to go back to the regular view. self.tabBarController.view = previousView seemed to have weird side effects...
Ben Scheirman
I eventually got this method working. Rotation really made this act a little weird, so I ended up just setting the web view's frame manually when in full screen mode.
Ben Scheirman
A: 

I found that if you mark the new view you will be pushing onto the navigation stack with the following line hides the tab bar as long as it is on the stack.

scrollViewController.hidesBottomBarWhenPushed = YES;

Steve
A: 

If the UITabBarController is pushed by a rootViewController (navigationController). You can try the following:

First hide the status Bar / Tab Bar;

[self.navigationController pushViewController:aBlankViewController animated:NO];
[self.navigationController popViewControllerAnimated:NO];

You should be able to reclaim the white space, though the screen will shock during the adjustment...