Creates a new instance from the given integer, if it can be represented exactly.
- Xcode 9.0+
- Swift Standard Library
A value to convert to this type of integer.
If the value passed as
source is not representable exactly, the result is
nil. In the following example, the constant
x is successfully created from a value of
100, while the attempt to initialize the constant
1 fails because the
Int8 type can represent
127 at maximum: