Extends Item

Apple.SearchBar

An iOS style search bar.

property Apple.SearchBar.Style style: .Prominent

The search bar style, which defines the default values of the search bar colors.

Apple.SearchBar.Style.Prominent

Apple.SearchBar.Style.Minimal

property String text

property Color textColor: #black

The search text and search text color.

property String placeholder

Placeholder text to be shown when there is no search text.

Apple.SearchBar {
    placeholder: "Artist"
}

event accepted()

The accepted event is fired when the user hits return or search on the keyboard.

property Apple.SearchBar.PlaceholderAlignment placeholderAlignment: .Center

Specifies whether the placeholder text and search icon are centered or left aligned in the SearchBar.

Apple.SearchBar.PlaceholderAlignment.Left

Apple.SearchBar.PlaceholderAlignment.Center

property Color color

property Color secondaryColor

property Color backgroundColor

The color, secondaryColor and backgroundColor properties set the colors used for different components of the search bar. The default values differ depending on the search bar style in use.

The color property sets the background color of the inner search entry field. By default this is white in the prominent style, and a transparent grey in minimal.

The secondaryColor property controls the color of the icons and placeholder text within the search entry field.

The backgroundColor property defines the overall background color of the search bar. It defaults to a dark grey in the prominent style, and is transparent in the minimal style.