Instance Method

setScopeBarButtonDividerImage:forLeftSegmentState:rightSegmentState:

Sets the divider image to use for a given combination of left and right segment states.

Declaration

- (void)setScopeBarButtonDividerImage:(UIImage *)dividerImage forLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState;

Parameters

dividerImage

The divider image to use for the combination of leftState and rightState.

leftState

The state of the left segment for which to set the divider image.

The state may be UIControlStateNormal or UIControlStateSelected.

rightState

The state of the right segment for which to set the divider image.

The state may be UIControlStateNormal or UIControlStateSelected.

Discussion

To customize the segmented control appearance you need to provide divider images to go between two unselected segments (leftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal), selected on the left and unselected on the right (leftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal), and unselected on the left and selected on the right (leftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected).

See Also

Customizing the Search Appearance

backgroundImage

The background image for the search bar.

- backgroundImageForBarPosition:barMetrics:

Returns the image used for the background in a given position and with given metrics.

- setBackgroundImage:forBarPosition:barMetrics:

Sets the image to use for the background in a given position and with given metrics.

- imageForSearchBarIcon:state:

Returns the image for a given search bar icon type and control state.

- setImage:forSearchBarIcon:state:

Sets the image for a given search bar icon type and control state.

- positionAdjustmentForSearchBarIcon:

Returns the position adjustment for a given icon.

- setPositionAdjustment:forSearchBarIcon:

Returns the position adjustment for a given icon.

inputAccessoryView

A custom input accessory view for the keyboard of the search bar.

scopeBarBackgroundImage

The background image for the scope bar.

- scopeBarButtonBackgroundImageForState:

Returns the background image for the scope bar button in a given state.

- setScopeBarButtonBackgroundImage:forState:

Sets the background image for the scope bar button in a given state.

- scopeBarButtonDividerImageForLeftSegmentState:rightSegmentState:

Returns the divider image to use for a given combination of left and right segment states.

- scopeBarButtonTitleTextAttributesForState:

Returns the text attributes for the search bar’s button’s title string for a given state.

- setScopeBarButtonTitleTextAttributes:forState:

Sets the text attributes for the search bar’ button’s title string for a given state.

- searchFieldBackgroundImageForState:

Returns the search text field image for a given state.

- setSearchFieldBackgroundImage:forState:

Sets the search text field image for a given state.

searchFieldBackgroundPositionAdjustment

The offset of the search text field background in the search bar.

searchTextPositionAdjustment

The offset of the text within the search text field background.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software