isTranslucent
A Boolean value that indicates whether the search bar is translucent (true) or not (false).
Declaration
var isTranslucent: Bool { get set }Discussion
The default value is true. If the search bar has a custom background image, the default is true if any pixel of the image has an alpha value of less than 1.0, and false otherwise.
If you set this property to true on a search bar with an opaque custom background image, the search bar will apply a system opacity less than 1.0 to the image.
If you set this property to false on a search bar with a translucent custom background image, the search bar provides an opaque background for the image using black if the search bar has UIBarStyle.black style, white if the search bar has UIBarStyle.default, or the search bar’s barTintColor if a custom value is defined.