init(rawValue:)
Creates a new instance with the specified raw value.
Declaration
init(rawValue: String)Parameters
- rawValue:
The raw value to use for the new instance.
Discussion
The following code example prints the specified raw value.
extension DeviceActivityName {
static let bedtime = Self("Bedtime")
}
print(DeviceActivityName.bedtime.rawValue)
// Prints "Bedtime".