我正在尝试使用二元运算符来比较两个值:
character = (xxx as NSString).characterAtIndex(2)
if character == "1" {
//do this thingy
}
现在我收到失败消息 Binary Operator '==' cannot be applied to unichar 或 String 类型的操作数。我也尝试过转换字符:
if String(character) == "1"
不工作...