0

In some cases I need to add a search bar or tab bar to my application. I use UIViewController for the UINavigationController content. Changing the frame on the UIViewControllers wont do anything.

Can anyone help?

Thank you.

Here's code which fails in the initWithStyle method of a UIViewController (Also fails in other methods):

CGRect frame = self.view.frame;
self.view.frame = CGRectMake(0, 0, frame.size.width, frame.size.height - 49);

That might not be perfect code but it should at least move the view.

Matthew Mitchell
  • 5,293
  • 14
  • 70
  • 122
  • which cases? what are you trying to do? what do you expect to get? you must provide good questions if you want good answers. – pasine Nov 21 '10 at 23:58
  • On a UINavigationController you display views, right? Well how do you resize these views inside the UINavigationController? I need to do this because I need to display bars over the top. – Matthew Mitchell Nov 22 '10 at 00:10
  • You're going to have to post some code. Resizing views that are inside a UINavigationController is done no differently to resizing any other view. Do you mean it's in the navigation controller UI itself (i.e. in the title bar), or in one of the ViewControllers in the navigation controller's stack? – d11wtq Nov 22 '10 at 00:20
  • Yes, in the stack. I've changed the frame and it does nothing. I'll post some code then... – Matthew Mitchell Nov 22 '10 at 00:21

1 Answers1

1

Here is a technique I use to make room beneath a UINavigationController for an AdBannerView that is global to the app. Perhaps you can do something similar.

global ADBannerView in iPhone app

Community
  • 1
  • 1
TomSwift
  • 39,369
  • 12
  • 121
  • 149