//
// ViewController.swift
// ListView
//
// Created by 朱莹浩 on 2017/7/22.
// Copyright © 2017年 朱莹浩. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate{
var table:UITableView!
let arry:[String] = ["我是谁", "我从哪里来", "要到哪里去"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//设置UITableView的位置
let rect = self.view.frame
table = UITableView(frame: rect)
self.table.backgroundColor = UIColor.blue
//设置数据源
self.table.dataSource = self
//设置代理
self.table.delegate = self
self.view.addSubview(table)
//注册UITabl