Swift Tips

结构相等符 == 被用来判断两个值是否相等。而引用相等 === 用来检查两个引用是否具有同一性,即是否指向同一个对象。

1
2
3
4
5
6
7
class A {
var p = 0
}

var a = A()
var b = a
print(b == a)

Swift4新特性

参考自:Ray Wenderlich - iOS11 by Tutorials

One-sided ranges

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×