Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
232 views
in Technique[技术] by (71.8m points)

ios7.1 - iOS 7.1 UISearchBar gray view

I work at an application and I tested today on iOS 7.1. Until now my search bar was normal:

iOS 7.0.3

But now I have this problem:

iOS 7.1

A gray view appears and I don't know how to remove it because I don't have this view in my code. Does anyone have the same problem? It is an iOS 7.1 bug?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

My quick fix used some code I found here: https://stackoverflow.com/a/18664917/1153630

And then:

searchBar.backgroundImage = [UIImage imageWithColor:[UIColor clearColor]];

I'm still not very impressed by it though: will update answer when I find a better way.

You may also want to checkout: Colour changed in iOS7.1, how to change searchBar colour?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...