class ca{
}
var library = [
1,
"a",
ca()
]
for item in library{
if item is ca{
println("\(item) is ca");
}
else if item is Int{
println("\(item) is Int");
}
}
原文链接:https://www.f2er.com/swift/326910.htmlclass ca{
}
var library = [
1,
"a",
ca()
]
for item in library{
if item is ca{
println("\(item) is ca");
}
else if item is Int{
println("\(item) is Int");
}
}
原文链接:https://www.f2er.com/swift/326910.html