swift 類和結構體

class SomeClass {
    var a = 1
}

struct SomeStruct {
    var width = 0
    var height = 10
}

let a1 = SomeClass()
let a2 = SomeStruct()

a1.a
a2.height
a2.width

 

1spa

10code

0blog

相關文章
相關標籤/搜索