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
leftStateandrightState. - leftState:
The state of the left segment for which to set the divider image.
- rightState:
The state of the right segment for which to set the divider image.
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).