iOS7.1 Uisearchbar Remove the black line.

Source: Internet
Author: User

Discover our app iOS7.1 compiled Uisearchbar background color is black

For normal effects (the recessed search box is not a uisearchbar background image, but a UIButton)

The effect is to hide UIButton after clicking to expand Uisearchbar



iOS7.1 post-compilation effects




Attempt to modify the Bartintcolor property

Searchbar.bartintcolor = [Uicolor Clearcolor]; Revision changed to

Searchbar.bartintcolor = [R.i Pinkcolor]; Effect



There are two black lines, very ugly. Many methods have been tried to get rid of these two lines.

[OBJC]View Plaincopyprint?
    1. Method 1. Searchbar. Searchbarstyle = Uisearchbarstyleminimal;

The above code can remove the black line, but Uisearchbaricon, Canclebutton, font color and so on need to change.


Continue to study and find the final Solution

[OBJC]View Plaincopyprint?
    1. <span style="FONT-SIZE:18PX;" > method 2.  [Searchbar setbackgroundimage:[uiimage new];
    2. </span>



Transferred from: http://blog.csdn.net/jekkihun/article/details/21244167

iOS7.1 Uisearchbar Remove the black line.

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.