Yalamandarao
Yalamandarao

Reputation: 3862

UISearchBar barTintColor clearColor error in iOS 8.0

In my app i am using UISearchBar in xib with Xcode 6. And i have given bar tin color is clear color. It's working on iOS 7.1 below.

But main problem is in iOS 8.0 it's not working clear color. It's displaying black color.

See Image :

enter image description here

Any one having adventurous of this issue.

Upvotes: 3

Views: 1713

Answers (3)

Dharmesh Dhorajiya
Dharmesh Dhorajiya

Reputation: 3984

You have to set UISearchBar tint color.

    UISearchBar *search=[[UISearchBar alloc]initWithFrame:CGRectMake(10, 20, 100, 20)];
    [search setBarTintColor:[UIColor clearColor]];
    search.backgroundImage=[UIImage new];
    self.navigationItem.titleView=search;

enter image description here

Upvotes: 0

Pradhyuman Chavda
Pradhyuman Chavda

Reputation: 3824

I had the same problem in search bar so i changed the Search style from default to Minimal.

And it changed the bar style.

enter image description here

Upvotes: 3

Armin Telker
Armin Telker

Reputation: 11

You can add a 1x1 pixel transparence image as background image to UISearchBar. It would be a dirty workaround. I think Apple should fix this issue.

Upvotes: 1

Related Questions