LayoutFlag
public struct LayoutFlag: OptionSet
Flags for marking which parts of a Layout
that need to be updated by its delegate.
A total of 64 flags can be defined:
- Common flags are defined by Layout.Flag_*, up to a maximum of 14 flags, which start at the highest order bit (ie. 63, 62, etc).
- Subclasses of
Layout
can define up to 50 custom layout flags, which start at the lowest order bit (ie. 0, 1, etc).
-
Declaration
Swift
public let rawValue: UInt64
-
Initializer for
Layout
subclasses looking to define a custom layout flag.Note
An assertion is made in this method thatlowestOrderBitIndex < 50
.Declaration
Swift
public init(_ lowestOrderBitIndex: UInt64)
-
Declaration
Swift
public init(rawValue: UInt64)
-
Return if a flag has been set for this value.
Declaration
Swift
public func hasFlagSet() -> Bool
Return Value
The equivalent of
self != LayoutFlag.None
. -
Declaration
Swift
public func intersectsWith(_ other: LayoutFlag) -> Bool
Return Value
True if
self
shares at least one common flag withother
.