SegmentedController
public protocol SegmentedController
Represents a type which provides data and handling for actions for a SegmentedViewController.
-
Returns the number of segments.
Declaration
Swift
func numberOfSegments() -> IntReturn Value
The number of segments.
-
Returns the view controller for the given segment index.
Declaration
Swift
func viewControllerForSegment(atIndex index: Int) -> UIViewController?Parameters
indexAn index of a segment.
Return Value
The view controller for the given segment index.
-
Returns the title for the given segment index.
Declaration
Swift
func titleForSegment(atIndex index: Int) -> String?Parameters
indexAn index of a segment.
Return Value
The title for the given segment index.
-
Tells the segmented controller that the segment at the specified index was selected.
Declaration
Swift
func didSelectSegment(atIndex index: Int, of segmentedViewController: SegmentedViewController)Parameters
indexThe index of the selected segment.
segmentedViewControllerThe segmented view controller object that is notifying you of the selection change.
View on GitHub
SegmentedController Protocol Reference