小编Wil*_*ung的帖子

类型'ViewController'不符合协议'UITableViewDataSource'

import UIKit

class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    var alphNames = ["ABC","DEF","GHI","JKL","MNO","PQR","STU"]

    func tableView(tableView: UITableView, numberofRowInsection section: Int) -> Int {
        return alphNames.count 
    }

    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
           let cellIdentifier = "Cell"
           let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath : indexPath) as UITableViewCell …
Run Code Online (Sandbox Code Playgroud)

uitableview ios swift

0
推荐指数
1
解决办法
6329
查看次数

标签 统计

ios ×1

swift ×1

uitableview ×1