Avatar
omochimetaru 4/18/2017 7:57 AM
class Animal {} class Cat: Animal {} let strinCat: (String, Cat) = ("xyz", Cat()) print(strinCat) if let stringAnimal: (String, Animal) = strinCat as Any as! (String, Animal) { print("yatta") print(stringAnimal) } これでyattaが出力された・・・ (edited)