开发者

Prevent UINavigationController's navigation bar to animate?

开发者 https://www.devze.com 2023-04-11 04:27 出处:网络
My UINavigationController\'s navigation bar is kind of static. This means, there is no back button, because going back in the stack is done via the first entry of the UITableView the controller holds.

My UINavigationController's navigation bar is kind of static. This means, there is no back button, because going back in the stack is done via the first entry of the UITableView the controller holds. The title also always shows the name of the root item. To achieve this I have added my own custom view to UINavigationController.NavigationItem.titleView

It looks a bit odd if a new controller is pushed in: the old navigation item vanishes, 开发者_高级运维just to get replaced by one looking exactly the same.

Is there a way to prevent this behavior? I want the animation for the content of the controller, so pushing the new controller without animation is not an option.


Add your own UINavigationBar and implement your own delegate and custom animations for the content views.

It sounds like you'll only need one UINavigationItem, so that makes this model easy to manage.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号