Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6538163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:42:14+00:00 2026-05-25T10:42:14+00:00

How can I remove the gloss/shine effect from the buttons on navigation bars? If

  • 0

How can I remove the gloss/shine effect from the buttons on navigation bars?
If I customize the navigation bar by using a custom image the buttons are not affected, can I remove the effect from them (the line and glossing), or define a hex color code for the whole button, or even a custom image for them too?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:42:15+00:00Added an answer on May 25, 2026 at 10:42 am

    I just went through the process of figuring this out. Basically, you need to create custom stretchable images and use them as the button’s background to get rid of the shine. Replacing the back buttons in a UINavigationController is a bit tougher. For that I used a UINavigationControllerDelegate to replace the default back button with my custom button.

    Here’s some code:

    1. Create a category on UIBarButtonItem that creates your custom button. Here’s mine. I use this category to customize both regular bar buttons and back buttons:

      @interface UIBarButtonItem (UIBarButtonItem_customBackground)
      
      + (id) customBarButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)selector;
      + (id) customBackButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)selector;
      
      @end
      
      @implementation UIBarButtonItem (UIBarButtonItem_customBackground)
      
      + (id) customButtonWithImageNamed:(NSString *)imageName selectedImageNamed:(NSString *)selectedImageName leftCapWidth:(CGFloat)leftCapWidth edgeInsets:(UIEdgeInsets)edgeInsets title:(NSString *)title target:(id)target selector:(SEL)selector {
          UIButton* customButton = [UIButton buttonWithType:UIButtonTypeCustom];
          [customButton addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside];
          customButton.titleLabel.font = [UIFont boldSystemFontOfSize:12.0f];
          customButton.titleLabel.shadowColor = [UIColor colorWithRed:0.0f/255.0f green:0.0f/255.0f blue:0.0f/255.0f alpha:0.25f];
          customButton.titleLabel.shadowOffset = CGSizeMake(0.0f, -1.0f);
          customButton.titleLabel.lineBreakMode = UILineBreakModeTailTruncation;
          customButton.titleEdgeInsets = edgeInsets;
          UIImage* navButtonBackgroundImage = [[UIImage imageNamed:imageName] stretchableImageWithLeftCapWidth:leftCapWidth topCapHeight:0.0f];
          UIImage* navButtonPressedBackgroundImage = [[UIImage imageNamed:selectedImageName] stretchableImageWithLeftCapWidth:leftCapWidth topCapHeight:0.0f];
          [customButton setBackgroundImage:navButtonBackgroundImage forState:UIControlStateNormal];
          [customButton setTitle:title forState:UIControlStateNormal];
          [customButton setBackgroundImage:navButtonPressedBackgroundImage forState:UIControlStateHighlighted];
          [customButton setBackgroundImage:navButtonPressedBackgroundImage forState:UIControlStateSelected];
      
          CGSize size = CGSizeMake(30.0f, 30.0f);
          if (title != nil) {
              size = [[NSString stringWithString:title] sizeWithFont:customButton.titleLabel.font];
          }
          customButton.frame = CGRectMake(0.0f, 0.0f, size.width + 20.0f, 30.0f);
          customButton.layer.shouldRasterize = YES;
          customButton.layer.rasterizationScale = [[UIScreen mainScreen] scale];
          return [[[UIBarButtonItem alloc] initWithCustomView:customButton] autorelease];
      }
      
      + (id) customBarButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)selector {
          return [self customButtonWithImageNamed:@"navButtonBG.png" 
                       selectedImageNamed:@"navButtonPressedBG.png" 
                             leftCapWidth:6.0f 
                               edgeInsets:UIEdgeInsetsMake(0.0f, 5.0f, 0.0f, 5.0f) 
                                    title:title 
                                   target:target 
                                 selector:selector];
      }
      
      + (id) customBackButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)selector {    
          return [self customButtonWithImageNamed:@"backButtonBG.png" 
                       selectedImageNamed:@"backButtonPressedBG.png" 
                             leftCapWidth:12.0f 
                               edgeInsets:UIEdgeInsetsMake(0.0f, 11.0f, 0.0f, 5.0f) 
                                    title:title 
                                   target:target 
                                 selector:selector];
      }
      
      @end
      
    2. Add the button to your UINavigationBar

      UIBarButtonItem* logoutButton = [UIBarButtonItem customBarButtonWithTitle:@"Logout" target:self selector:@selector(logout)];
      self.navigationItem.rightBarButtonItem = logoutButton;
      
    3. If you also want to replace the UINavigationController’s back buttons, setup a UINavigationControllerDelegate and implement the willShowViewController method like so:

      - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
          if([navigationController.viewControllers count ] > 1) {
              UIViewController* backViewController = [navigationController.viewControllers objectAtIndex:(navigationController.viewControllers.count - 2)];
              NSString* backText = backViewController.title;
              UIBarButtonItem* newBackButton = [UIBarButtonItem customBackButtonWithTitle:backText target:navigationController selector:@selector(popViewControllerAnimated:)];
              viewController.navigationItem.leftBarButtonItem = newBackButton;
              viewController.navigationItem.hidesBackButton = YES;
          }
      }
      
    4. Here are the stretchable images I’m using:

      • Back button: back button Pressed: enter image description here
      • Regular button: enter image description here Pressed: enter image description here
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to remove the gloss effect from an iOS icon using
Is there a way I can remove the background bar image in the SeekBar
How can add/remove/replace LIST in cookies using C#. //Declaring the List for image list
Does anyone know how I can remove the address bar from the Android browser
Does anyone know how I can remove links from the top menu using local.xml.
One can remove all calls to printf() using #define printf . What if I
I was wondering if when using the datagridview control you can remove the thing
Can you remove an item from a List<> whilst iterating through it? Will this
can we remove history points created in web browser. or is it possible not
How can I remove those annoying Mac OS X .DS_Store files from a Git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.