IOS removes the border Gray Line in the navigation bar; Removes the border Gray Line in the search box and the text box shadow.

Source: Internet
Author: User

IOS removes the border Gray Line in the navigation bar; Removes the border Gray Line in the search box and the text box shadow.

To implement the above interface, the display is usually inconsistent with the Expected One, although the color we set is the same. You can perform the following steps:

1. Disable the transparency of navigationBar

 

Self. navigationController. navigationBar. translucent = NO;


2. Use the native digital color meter to measure the rgb color of the navigation bar, and then set the color of the navigation bar and the background color of the following view.

3. Remove the gray lines under the navigation bar

 

 

[Self. navigationController. navigationBar setBackgroundImage: [[UIImage alloc] init] forBarMetrics: UIBarMetricsDefault];

[Self. navigationController. navigationBar setShadowImage: [[UIImage alloc] init];

 


Remove the border Gray Line in the navigation bar

[Self. navigationController. navigationBar setBackgroundImage: [[UIImage alloc] init] forBarMetrics: UIBarMetricsDefault];

Self. navigationController. navigationBar. shadowImage = [[UIImage alloc] init];

Remove the black line from the search box

 

[Self. mySearchBar setBackgroundImage: [[UIImage alloc] init];

Remove the text field shadow from the search box.

 

On the stroryboard, select the search box --> in attribute inspector --> View, and select clear color in the Tint color bar.



 

Related Article

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.