Swift报错:Swift Compiler Error Type 'int' does not conform to protocol 'Boolean Type'
在OC中,用0,1表示bool.习惯了这样的写法:
int i = @H_502_17@1;
if (i) {
}
错误代码:
let a = @H_502_17@1
if a {
if a == @H_502_17@1 {