Contents

setScopeBarButtonDividerImage(_:forLeftSegmentState:rightSegmentState:)

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

Declaration

func setScopeBarButtonDividerImage(_ dividerImage: UIImage?, forLeftSegmentState leftState: UIControl.State, rightSegmentState rightState: UIControl.State)

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 Normal or Selected.

  • rightState:

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

    The state may be Normal or Selected.

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 scope bar appearance