// // NoticeViewController.swift // SocketChat // // Created by Justine on 16/5/30. // Copyright © 2016年 AppCoda. All rights reserved. // import UIKit class NoticeViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { var tableView:UITableView? var dataList = NSMutableArray() override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor() self.tableView?.dataSource = self self.tableView?.delegate = self // Do any additional setup after loading the view. } 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. } */ //实现继承的委托中的两个方法 func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ return 100; } //返回Cell 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; } }