以下は私のナビゲーションバーの画像で、右バーボタンが無効になっています。しかし、無効にすると、テキストが白色に変わります。私は白い色を望んでいません。これの任意のソリューション。
[編集] ボタンが有効になっているときの最初の画像。[編集] ボタンが無効になっている場合はその他。その場合、テキストの色を変更せずにボタンを無効にすることはできますか。よろしくお願いします
これはバーボタンをカスタマイズするためのものです
[[UIBarButtonItem appearance] setTintColor:[UIColor colorWithRed:253.0/255.0 green:220.0/255.0 blue:135.0/255.0 alpha:1.0]];
[[UIBarButtonItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor], UITextAttributeTextColor,
[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0], UITextAttributeTextShadowColor,
[UIFont fontWithName:@"MyriadPro-Cond_0" size:16.0], UITextAttributeFont, nil]
forState:UIControlStateNormal];
これはバーボタン用です
UIBarButtonItem *rightBarBtnEdit=[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(methodEdit:)];
[rightBarBtnEdit setTag:701];
[self.navigationItem setRightBarButtonItem:rightBarBtnEdit];
これは無効になっています
self.navigationItem.rightBarButtonItem.enabled = NO;