Tag: rightbarbuttonitem

自定义rightBarButtonItem消失

我在NavBar中有一个自定义的RightBarButtomItem的奇怪的错误。 我有一个TabBar应用程序。 如果该应用程序已加载button显示正确。 如果我点击标签button不断显示。 如果我回到已经显示的标签之一,button消失。 最后,button只在其中一个标签中随机显示。 我的代码完美工作,如果我设置一个标准的rightBarButtomItem编程。 但不是自定义graphics。 如果一个ChildViewController被按下并popup,该button再次出现。 它似乎仍然存在但不可见! 我认为我在CustomTabBarViewController中的sharedRightButton的引用是错误的! 任何人都可以帮忙吗? CustomTabBarController.h #import <UIKit/UIKit.h> #import "EZBadgeView.h" @interface CustomTabBarController : UITabBarController { EZBadgeView *badgeView; UIButton *btn; UIImage *rightBarButtonItemImage; UIImage *rightBarButtonItemImageTapped; UIImage *rightBarButtonItemImageSelected; } @property (nonatomic, strong) UIBarButtonItem *sharedRightButton; @property (nonatomic, strong) EZBadgeView *badgeView; @property(nonatomic, strong) UIButton *btn; @property(nonatomic, strong) UIImage *rightBarButtonItemImage; @property(nonatomic, strong) UIImage *rightBarButtonItemImageTapped; […]

隐藏导航控制器的右边栏button

有谁知道如何隐藏一个UINavigationController ? 在我的应用程序中,我有一个编辑button作为UINavigationController的rightBarButtonItem 。 我想隐藏这个? UIBarButton`当一些操作完成。

更改iOS 7中的酒吧button的颜色

我在我的viewDidLoad包含我的视图中有以下代码: // Now add the next button UIBarButtonItem *nextButton = [[UIBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:self action:@selector(self)]; self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor]; self.navigationItem.rightBarButtonItem = nextButton; UINavigationController的父级在viewDidLoad中有这个: [super viewDidLoad]; // Do any additional setup after loading the view. self.navigationBar.tintColor = [UIColor whiteColor]; self.navigationBar.barTintColor = [UIColor blackColor]; 我怎样才能自定义右边的button来改变背景颜色和文字颜色?