[Swift4] 変数の型を出力する

変数の型を取得、出力したかったので備忘録を兼ねてメモ。
Swift4で変数の型を出力する
Xcodeのヒントでも出てきますが。
var whatType = "type?"
type(of: whatType)
=> String
変数の型を取得、出力したかったので備忘録を兼ねてメモ。
Xcodeのヒントでも出てきますが。
var whatType = "type?"
type(of: whatType)
=> String