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?
myView.autoresizingMaskwill 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 eachautoresizingMaskof the subviews.Short Answer:
Make sure your views use the
autoresizingMaskand you should be done.