Note that there are some explanatory texts on larger screens.

plurals
  1. POdisable bar button text color changes to white?
    text
    copied!<p>Given below is image of my navigation bar, where right bar button is disable now. but when i disable it its text changes to white color. i don't want white color. Any solution of this.</p> <p>First image when Edit button is enabled. Other when Edit button is disabled. Can we disable button without changes its text color in that case. many thanks in advance</p> <p>this is for customizing bar button</p> <pre><code> [[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]; </code></pre> <p>this is for bar button</p> <pre><code> UIBarButtonItem *rightBarBtnEdit=[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(methodEdit:)]; [rightBarBtnEdit setTag:701]; [self.navigationItem setRightBarButtonItem:rightBarBtnEdit]; </code></pre> <p>this is disabling</p> <pre><code> self.navigationItem.rightBarButtonItem.enabled = NO; </code></pre> <p><img src="https://i.stack.imgur.com/D4lNI.png" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/dCz73.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload