问题描述
我有一个完全用代码设置和控制的导航栏.所以它不会出现在IB中.我有一个按钮出现在self.navigationitem.rightbarbutton = myButton;"我通过将其设置为等于 NIL 使其消失.我想知道的是我怎样才能让它淡入淡出?
I have a navigation bar that is set up and controlled completely with code. So it does not show up in IB. I have a button appear by "self.navigationitem.rightbarbutton = myButton;"An I make it go away by setting it equal to NIL. What I am wondering is how could I make it fade in and out?
推荐答案
我找到了最适合我的方法[self.navigationItem setRightBarButtonItem:myButton 动画:YES];进而[self.navigationItem setRightBarButtonItem:nil 动画:YES];让它淡出.
I found what worked best for me[self.navigationItem setRightBarButtonItem:myButton animated:YES];And then[self.navigationItem setRightBarButtonItem:nil animated:YES];To make it fade out.
这篇关于使 uibarbuttonitems 消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!