如何访问以下内容?

时间:2015-10-06 11:18:53

标签: ios

class GroupEntities: NSObject {
    var name = String()
    var noOfMembers = Int()
    var isAdmin = Bool()
    var isOpen = Bool()
}

GroupEntities课程中,如何通过名为UITableview

的名称在另一个班级的RJContactGroup中访问此内容

1 个答案:

答案 0 :(得分:0)

这样的事情:

class GroupEntities: NSObject {
    var name = String()
    var noOfMembers = Int()
    var isAdmin = Bool()
    var isOpen = Bool()
}


class MyTableViewController {
    var rjContactGroup = GroupEntities()

    func setProperties() {
       rjContactGroup.name = "Test Name"
       rjContactGroup.noOfMembers = 6
       rjContactGroup.isAdmin = true
       rjContactGroup.isOpen = true
   }
}