InformerTabSegmentedControl - admiral-team/admiralui-ios GitHub Wiki
Class
A horizontal control that consists of multiple segments, each segment functioning as a discrete button with text and subtext.
Declaration
public class InformerTabSegmentedControl: TabSegmentedControl, SegmentControlContainerContent, AnyAppThemable
Overview
A segmented control can display a title and subtitle. When you add and remove segments, you can request that the action be animated with sliding and fading effects.
Live example
Configure an Informer Tab Segmented Control
Configuration an informer tab segmented control the similar UISegmentedControl, but for useful we added constructor with title and subtitle.
let segmentControl = InformerTabSegmentedControl(items: [
InformerTab(title: "2 900 %", subtitle: "in month"),
InformerTab(title: "2 900 $", subtitle: "in month")]
)
segmentControl.selectedSegmentIndex = 0
Handle a selection
You register the target-action methods for a segmented control using the valueChanged.
segmentControl.addTarget(self, action: #selector(segmentedValueChanged), for: .valueChanged)
Contribution
You can help us to find bugs or ask us to add features.
- To start
issue
please use ready-made templates. - To make changes to the repository, you need to create a
fork
of the project, make changes to the code and create apull request
in our project. You can read more about this in the Github documentation.