Ios 此代码可以';请不要跑。告诉我为什么?

Ios 此代码可以';请不要跑。告诉我为什么?,ios,Ios,跑步不行。我不知道为什么?谢谢你抽出时间 您必须使用UITableViewDataSource继承协议UITableViewDelegate。 没有UITableViewDelegate它的委托方法将不会调用 请检查我下面的代码 类sipinViewController:UIViewController、UITableViewDataSource、UITableViewDelegate{ }它不能工作是什么意思?你的意思是什么?您好,现在我添加了一个代理,但我不知道这个返回值是错误的。请问,这里

跑步不行。我不知道为什么?谢谢你抽出时间

您必须使用
UITableViewDataSource
继承协议
UITableViewDelegate
。 没有
UITableViewDelegate
它的委托方法将不会调用

请检查我下面的代码

类sipinViewController:UIViewController、UITableViewDataSource、UITableViewDelegate{

}

它不能工作是什么意思?你的意思是什么?您好,现在我添加了一个代理,但我不知道这个返回值是错误的。请问,这里的返回值数组是什么?非常感谢。
import UIKit
import AVKit

class sipinViewController: UIViewController, UITableViewDataSource,UITableViewDragDelegate{

    func tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] {
        return cell
    }

    let  addipArray = [" 1 ","2"  ,"3  "]

    //章节里有几个cell。箭头号表示回传,一定要用return回传一个值。
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return addipArray.count
    }

    //cell里显示的内容。
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

        let  cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
        cell.textLabel?.text = addipArray[indexPath.row]
        return cell
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }
}