// // SettingViewController.swift // SocketChat // // Created by Justine on 16/5/27. // Copyright © 2016年 AppCoda. All rights reserved. // import UIKit class SettingViewController: UITableViewController { @IBAction func btnLogOut(sender: UIButton) { logout() } var dataList = NSMutableArray() override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.blueColor() // Do any additional setup after loading the view. self.tableView?.dataSource = self self.tableView?.delegate = self } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. } */ //实现继承的委托中的两个方法 // //静态的 // override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ // return 100; // } // // //返回Cell 静态的 // override func tableView(tableView:UITableView, cellForRowAtIndexPath indexPath:NSIndexPath)->UITableViewCell{ // //根据需求自己重绘 // let cell = UITableViewCell(style: .Default, reuseIdentifier: "cell") // // let cellID="Cell ID"; // // var cell=tableView.dequeueReusableCellWithIdentifier(cellID) as? UITableViewCell; // // // return cell; // } }