var tempTableView: UITableView = UITableView (frame: self.view.bounds, style: .Plain)
2/
self.zyTableView.separatorStyle = .SingleLine
self.zyTableView.separatorColor = .redColor()
3/ 類方法
class func heros() -> NSArray{
let bundle: NSBundle = NSBundle .mainBundle()
let array: NSArray = NSArray (contentsOfFile: NSBundle .mainBundle() .pathForResource("heros.plist", ofType: nil)!)!
print("打印英雄數組: %@",array)
let arrayM: NSMutableArray = NSMutableArray ()
for object in array{
arrayM .addObject(ZYHero .heroWithDict(object as! NSDictionary))
}
return array
}
class func heroWithDict(zydictionary: NSDictionary)-> ZYHero {
return ZYHero (zyDictionary: zydictionary)
}
4/ 調用類方法
var heros: NSArray = ZYHero .heros()