我想在类型为AnyObject
的数组上使用contains
函数。
import UIKit
var resultArray: Array<AnyObject> = Array()
resultArray.append(50)
resultArray.append(false)
resultArray.append("Test string")
let found = contains(resultArray, 50)
I get the error:
Type 'AnyObject -> L' does not conform to protocol 'IntegerLiteralConvertible'
AnyObject
的目的是什么? - Khawar