IOS removes the border gray line from the navigation bar; Removes the border gray line of the search box and the shadow of the text input box in it

Source: Internet
Author: User


If you want to implement the above interface, it will generally show inconsistent with the expected, although we set the color is the same. The following steps can be implemented:

1. Turn off the transparency of Navigationbar

self. Navigationcontroller . Navigationbar . Translucent = NO ;


2. Using the digital color measuring meter, the navigation bar color of the RGB, again set the navigation bar color and the following view background color.

3. Remove the gray split line below the navigation bar

[self. Navigationcontroller . Navigationbar setbackgroundimage: [[UIImagealloc] init]forbarmetrics:uibarmetricsdefault];

[self. Navigationcontroller . Navigationbar setshadowimage: [[UIImagealloc]Init ]];


Remove the border gray line from the navigation bar

 < Span style= "COLOR: #ff0000" >[ self navigationcontroller navigationbar setbackgroundimage :[[ UIImage alloc Init forbarmetrics : uibarmetricsdefault

Self . Navigationcontroller . Navigationbar . ShadowImage = [[UIImage alloc]init];

Remove the border black line from the search box

[Self. Mysearchbar setbackgroundimage:[[uiimage alloc] init]];

Remove the shadow from the text input box of the search box

In Stroryboard: Select the search box and the right in attribute Inspector-->view select clear color in the tint color bar



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

IOS removes the border gray line from the navigation bar; Removes the border gray line of the search box and the shadow of the text input box in it

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.