Swift 有没有办法在操场上测试我的扩展方法
我尝试了苹果开发者博客上的示例,但我注意到游乐场似乎没有看到扩展。这可能吗Swift 有没有办法在操场上测试我的扩展方法,swift,Swift,我尝试了苹果开发者博客上的示例,但我注意到游乐场似乎没有看到扩展。这可能吗 func valuesForKeys2(keys: [Key]) -> [Value?] { //this iterates throw each key and executes a function //on the class for each value return keys.map { self[$0]} } 你指的是哪个样本?我想我在这里找到了我自己问题的答案。
func valuesForKeys2(keys: [Key]) -> [Value?] {
//this iterates throw each key and executes a function
//on the class for each value
return keys.map { self[$0]}
}
你指的是哪个样本?我想我在这里找到了我自己问题的答案。