Segmented control
A segmented control is a set of linear segments, and each button's corresponding function can display a different view.
API NOTE
View Uisegmentedcontrol to learn more about defining a segmented control in your code.
A segmented control:
- Combine two or more segments whose widths are proportional to the total number of segments
- can display text or pictures
Use segmented controls to provide tightly related and mutually exclusive options.
make sure that each segment is easy to click. Give each segment a comfortable click area that maintains 44*44, limiting the number of segments. On iphone, the number of segments for a segmented control should be less than or equal to 5.
as much as possible, make the content dimensions of each segment consistent. Because each segment in a segmented control has the same width, it does not look good if the content is filled with fragments and the others are not fully populated.
do not mix text and pictures in a segmented control. A segmented control can contain text and pictures. A single fragment can contain text or pictures, but not all. In general, it is best not to put the text in some segments in a segmented control and put the picture in another segment.
If necessary, adjust the content location in the custom segmented control. If you customize the background of a segmented control, make sure that the automatic centering of the content of the control still looks good. Use the Bar Metrics API to adjust the content location in the segmented control (see the Uisegmentedcontrol in the custom API to learn more about custom bar metrics).
This article is translated from the official Apple development document to view the integration set: Https://github.com/Cloudox/iOS-Human-Interface-Guidelines All rights reserved: Http://blog.csdn.net/cloudox_
"IOS Human Interface Guidelines"--segmented Control