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

  • Home
  • SEARCH
  • 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 7845287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:10:33+00:00 2026-06-02T17:10:33+00:00

When I add a UIToolbar to a view in XIB, make it Black Translucent

  • 0

When I add a UIToolbar to a view in XIB, make it Black Translucent style (and not Opaque), it has a 2-pixel black stroke at the top of it. Meanwhile, a Black Translucent style, non-Opaque UISearchBar has a 1-pixel black stroke at the top. These are both positioned at the same place (44px down, right under the navigation bar).

Toolbar vs Searchbar

I’d much prefer the 1px black stroke top on the UIToolbar, to match the view with the Search Bar and make it blend more with the navigation bar. Can I achieve this without subclassing the toolbar? For example, is there a way to use a Search Bar and hide the input field?

  • 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-06-02T17:10:36+00:00Added an answer on June 2, 2026 at 5:10 pm

    Why they are different

    They are different because they are meant to be placed differently. The toolbar is meant to be placed at the bottom of the screen where the 2px black stroke looks nice.

    For example, look at the Mail app (iPhone) and you can see (even though it is not translucent) that the toolbar has a 2px black stroke while the search bar only has a 1px stroke. You also see how they are meant to be placed:

    • search bar under the navigation bar
    • toolbar at the bottom of the screen.

    How you can change them

    Neither of these is an elegant solution, sorry.

    Draw the toolbar yourself

    You could draw the entire view yourself with either Core Graphics or a CAGradientLayer. It will be cumbersome but you can make it look however you like.

    Clip the top of the stroke

    You could place the toolbar in a 43px view and set clipsToBounds to YES. By positioning the toolbar at (0, -1) the first point/pixel of the stroke will be clipped and won’t show up. The toolbar will be one pixel smaller (height = 43), so you would have to make the superviews height 44px and the toolbars height 45px (still at (0,-1)) to make it 44px again. This will change the gradient slightly so the end result will have some other visual effects than just removing the top pixel of the stoke.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to add a uitoolbar able to slide -in from the top
I am trying to add a the UINavigationController UIToolbar to the top of the
How add some style only to GWT container, not to all widget that container
I have view that has a webview and a UIToolbar. I want to create
I have an UITableViewController which I would like to add UIToolbar to with one
I'd like to add a custom UIToolbar to my UIViewController. In Interface Builder I
I'd like to add an image to a UIToolBar that a user cannot interact
I add new CheckBox in getView() (PlanAdapter class) public View getView(int position, View convertView,
How add two images side by side in a UITableViewCell? The style of UITableViewCell
I have an app with a navigation bar at the top. On one view

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.