Swift: Table view superclass error

后端 未结 4 1392
我寻月下人不归
我寻月下人不归 2021-01-15 21:00

I have created a slide out menu using Swift. I have done this many times before, but when I created it today, I get this error (see screenshot). It could just be a simple mi

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-15 21:23

    Make sure that your class implements UITableViewDelegate and UITableViewDataSource.

    class MyController: UIViewController, UITableViewDelegate, UITableViewDataSource {
        // All your methods here
    }
    

    You won't need override keyword unless any other superclass already implements those methods.

提交回复
热议问题