Is that possible using "setAutoresizingMask" to make the view autoresizing after hiding/showing navigation bar?
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 n开发者_JAVA技巧avigation 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.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.
精彩评论