views:

211

answers:

1

I am doing this with the following:

[[self  navigationController] setNavigationBarHidden:YES animated:YES];

and also I didn't use IB to create view objects. But my view did not auto-resize after hiding navigation bar(there was a blank area where the navigation bar used to be)

I am wondering if I could make it auto-resize only by "setAutoresizingMask", or do I have to use some hand-writing animation stuff?

A: 

myView.autoresizingMask will do exactly this for you. As soon as the navigation bar is hidden, the bounds of the superview of your views changes. This will auto-resize all subviews of the superview (and therefore all of your views) by having a look at each autoresizingMask of the subviews.

Short Answer:

Make sure your views use the autoresizingMask and you should be done.

bddckr
Thank you for your answer. I did add the autoresizingMask but it did not work for me. I am going to check my code again
Mickey Shine