Returns whether the indicated segment is enabled.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
Parameters
segment
An index number identifying a segment in the control. It must be a number between 0 and the number of segments (
number
) minus 1; values exceeding this upper range are pinned to it.Of Segments
Return Value
true
if the given segment is enabled and false
if the segment is disabled. By default, segments are enabled.