can't customize navigationbar y position in iOS 10?

I customized the navigation bar frame(y position) so it shows on the bottom in iOS 9.x with code like:

self.navigationController.navigationBar.frame = CGRectMake(0, 320-32, oldRect.size.width, oldRect.size.height);

but it stops working in iOS 10. got something like the screenshot http://i.stack.imgur.com/i0Vo1.png. the bar items are still on the bottom but the height becomes the screen height. the top part is covered too. Any idea how to fix this?

If you want to put the navigation bar in a custom position, then you cannot use UINavigationController, as UINavigationController fully owns the layout of the navigation bar. You should instead use a plain UINavigationBar with your own UIViewController subclass and implement the UINavigationBarDelegate protocol to ensure the bar appears as you want.

can't customize navigationbar y position in iOS 10?
 
 
Q