Suresh Varma
Suresh Varma

Reputation: 9740

Stop top and bottom bar from animating - iPhone

I am using a navigation controller with n numbers of controllers.

Now while moving from one screen to another the top bar and bottom bar too transits if I push the controller.

So the question Is there any way out where I can prevent the transition of Top and bottom bar.

N.B. The contents of top bar are static but the contents of bottom bar keeps on changing depending upon the requirement in that particular page.

Any help or suggestions will really be appreciated.

Upvotes: 1

Views: 256

Answers (2)

ader
ader

Reputation: 5393

Given your requirements stated above, I would use the UINavigationController but make the NavigationBar hidden and implement my own header bar graphic (UIView) and any required buttons.

[self navigationController].navigationBar.hidden = YES;

Upvotes: 0

Mats Stijlaart
Mats Stijlaart

Reputation: 5098

Make the tab bar not part of your navigationcontroller view.

Make a UIViewController with a view.
Make a instance variable in the UIViewController that is of the type UINavigationController.
Make the navigation bar hidden for the UINavigationController.

Set UIVIewController content like this

UIViewController     UIViewControllers content view setup.
-------------------  -------------------
|UIView           |  |UINavigationBar  |
|                 |  |-----------------|
|                 |  |UINavigationVi   |
|                 |  |ewController     |
|                 |  |content view     |
|                 |  |                 |
|                 |  |                 |
|                 |  |                 |
|                 |  |                 |
|                 |  |                 |
|                 |  |                 |
|                 |  |-----------------|
|                 |  |UIToolBar        |
-------------------  -------------------

Let the interaction from the bars call a method in the UIViewController, which interacts on his turn with the UINavigatioViewController.

I hope this was helpful and clear enough.

Note your current situation is like this:

UINavigationControllerViewController
-------------------
|view containing  |
|bars and current |
|controller       |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
-------------------

Upvotes: 1

Related Questions