init(booleanLiteral:)
Creates an instance initialized to the given Boolean value.
Declaration
init(booleanLiteral value: Self.BooleanLiteralType)Parameters
- value:
The value of the new instance.
Discussion
Do not call this initializer directly. Instead, initialize a variable or constant using one of the Boolean literals true and false. For example:
let twasBrillig = trueIn this example, the assignment to the twasBrillig constant calls this Boolean literal initializer behind the scenes.