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

 

1

10

0

 

posted on 2014-11-26 14:34  wangbokun  阅读(164)  评论(0编辑  收藏  举报

导航